%%PageItemTitle%%

VectorDraw Web Library

JsPropertiesExtractor Send comments on this topic.
FixAngle Method
See Also  Example
vdWebLibrary Namespace > vdgeo Class : FixAngle Method
inangle
The angle to be fixed in radians.
equality
A decimal number representing the minimum value to be considered as a valid difference. Differences smaller than this value will be considered as 0. If this parameter is not set the library's default equality will be used instead.
Makes sure that the angle passed as parameter is restrained between 0 and 2PI radians. Also checks if the angle is equal to one of the main angles of the circle and depending on the equality parameter, returns the fixed value whithout any digits.

Syntax

JScript 
public function FixAngle( 
   inangle : double,
   equality : double
) : double;

Parameters

inangle
The angle to be fixed in radians.
equality
A decimal number representing the minimum value to be considered as a valid difference. Differences smaller than this value will be considered as 0. If this parameter is not set the library's default equality will be used instead.

Return Value

The fixed angle in radians.

Example

C#Copy Code
//The second parameter can be undefined!!! 
angle = vdgeo.FixAngle(angle);

See Also