Method IsNear
IsNear(double, double, double)
Determines whether two angles in degrees are within a specified inclusive tolerance.
public static bool IsNear(double a, double b, double epsDeg)
Parameters
adoubleFirst angle in degrees.
bdoubleSecond angle in degrees.
epsDegdoubleTolerance in degrees (inclusive).
Returns
Examples
Angles.IsNear(359.9, 0.1, 0.5) // true
Angles.IsNear(45, 60, 10) // false
Remarks
This method is wrap-around aware. For example, 359.9° and 0.1° are within 0.5°.
- See Also