Example #1
0
        /// <summary>
        /// Returns the clockwise angle between the reference direction and a position.
        /// </summary>
        /// <param name="pos">The position we want the clockwise angle to.</param>
        /// <param name="angtol">Angular tolerance. If you specify a non-zero value, and the position is
        ///	within tolerance of the reference bearing, you will get back a value of zero.</param>
        /// <returns>The clockwise angle, in radians.</returns>
        public double GetAngleInRadians(IPosition pos, double angtol)
        {
            // Get the bearing of the specified position.
            double bearing = BasicGeom.BearingInRadians(m_Origin, pos);

            // Return the angle.
            return(GetAngleInRadians(bearing, angtol));
        }
Example #2
0
 /// <summary>
 /// Creates a new <c>Turn</c> with the supplied origin and reference positions
 /// </summary>
 /// <param name="origin">The origin for the turn.</param>
 /// <param name="reference">The position of the reference point.</param>
 public Turn(IPosition origin, IPosition reference)
 {
     m_Origin    = origin;
     m_Reference = reference;
     m_Bearing   = BasicGeom.BearingInRadians(m_Origin, m_Reference);
 }