Contents - Index


VectorPolarAngle

 

The VectorPolarAngle function accepts 1 parameter, which is the name of a 2D vector.   This function must be placed after the $Vector2D directive that identifies a vector variable.

 

The function returns the angle between the positive x-direction and the vector. The angle is based on the right-hand horizontal reference direction with a positive value being measured counter-clockwise.  The function returns a value between -pi and +pi (or -180 deg to +180 deg) depending on the setting of the unit system for angles set with the Unit System command or the $UnitSystem directive.

 

Example:

 

$Vector2D V 

$UnitSystem deg

V=VectorAssign(-1.5,-0.75) [N]

ang=VectorPolarAngle(V)

 

{Solution:

ang=-153.4 [deg]}

 

See also: VectorAngle_x