7 double lx = m_wpos[0] - m_wpos[3];
8 double ly = m_wpos[1] - m_wpos[4];
9 double lz = m_wpos[2] - m_wpos[5];
11 double xhit = ( z - m_wpos[2] ) * lx / lz + m_wpos[0];
12 double yhit = ( z - m_wpos[2] ) * ly / lz + m_wpos[1];
14 double r = sqrt( ( xhit * xhit ) + ( yhit * yhit ) );
15 double phi = asin( yhit / r );
17 if ( xhit < 0 ) phi =
PI - phi;
18 if ( phi < 0 ) phi +=
PI2;