PurplePen.CrossingCourseObj.ChangeOrientation C# (CSharp) Method

ChangeOrientation() public method

public ChangeOrientation ( float newOrientation ) : void
newOrientation float
return void
        public void ChangeOrientation(float newOrientation)
        {
            orientation = newOrientation;
        }

Usage Example

Example #1
0
 // Change the orientation of the crossing point course object to the given angle in degrees.
 private void RotateToAngle(PointF point)
 {
     double angleInRadians = Math.Atan2(point.Y - courseObj.location.Y, point.X - courseObj.location.X);
     float angleInDegrees = (float) Geometry.RadiansToDegrees(angleInRadians);
     courseObj = (CrossingCourseObj) courseObj.Clone();
     courseObj.ChangeOrientation(angleInDegrees);
 }