The Utils type exposes the following members.
Back to Top
Methods
Name  Description  

GetRandom 
Returns random number generator. It might be configured for repeatable behavior by setting DRANDOMSEED option.
 
IsNear 
Tests if the two double values are near to each other.
It is recommended to use this method instead of testing if the two
doubles are equal using an this expression: value1 == value2.
The reason being, that this expression might never become
true due to the precision of double values.
Whether or not the specified doubles are near to each other is defined by
the following expression:
(Math.abs(value1  value2) < .00001)
 
NormalAbsoluteAngle 
Normalizes an angle to an absolute angle.
The normalized angle will be in the range from 0 to 2*PI, where 2*PI
itself is not included.
 
NormalAbsoluteAngleDegrees 
Normalizes an angle to an absolute angle.
The normalized angle will be in the range from 0 to 360, where 360
itself is not included.
 
NormalNearAbsoluteAngle 
Normalizes an angle to be near an absolute angle.
The normalized angle will be in the range from 0 to 2*PI, where 2*PI
itself is not included.
If the normalized angle is near to 0, PI/2, PI, 3*PI/2 or 2*PI, that
angle will be returned. The IsNear(Double, Double)
method is used for defining when the angle is near one of angles listed
above.
 
NormalNearAbsoluteAngleDegrees 
Normalizes an angle to be near an absolute angle.
The normalized angle will be in the range from 0 to 360, where 360
itself is not included.
If the normalized angle is near to 0, 90, 180, 270 or 360, that
angle will be returned. The IsNear(Double, Double)
method is used for defining when the angle is near one of angles listed
above.
 
NormalRelativeAngle 
Normalizes an angle to a relative angle.
The normalized angle will be in the range from PI to PI, where PI
itself is not included.
 
NormalRelativeAngleDegrees 
Normalizes an angle to a relative angle.
The normalized angle will be in the range from 180 to 180, where 180
itself is not included.
 
ToDegrees 
Conversion from radians to degrees
 
ToRadians 
Conversion from degrees to radians

See Also