MathUtility.GetVectorAngle method (1 of 2)

Gets the angle of the vector, in radians.

public static double GetVectorAngle(double vectorX, double vectorY)
parameter description
vectorX The X coordinate of the vector for which the angle should be calculated.
vectorY The Y coordinate of the vector for which the angle should be calculated.

Return Value

The angle of the vector, in radians.

Remarks

The value returned by this method will always be between 0 and 2 * Pi

See Also


MathUtility.GetVectorAngle method (2 of 2)

Gets the angle of the vector, in radians without using System.Windows.Vector

public static double GetVectorAngle(double pt1X, double pt1Y, double pt2X, double pt2Y)
parameter description
pt1X The X coordinate of Starting point.
pt1Y The Y coordinate of Starting point.
pt2X The X coordinate of Ending point.
pt2Y The Y coordinate of Ending point.

Return Value

The angle of the vector, in radians.

Remarks

The value returned by this method will always be between 0 and 2 * Pi

See Also