Function Angle.tryFromRadians
Construct from radians without throwing.
Parameters
| Name | Description |
|---|---|
| radians | Finite angle in radians. |
| result | Receives the constructed angle on success. |
Returns
true on success; false for NaN or infinity. On failure
result is initialized to on entry and has no guaranteed value on failure.
Example
Example checking radian input without throwing.
import geodesy;
Angle!double angle;
assert(Angle!double .tryFromRadians(0.5, angle));
assert(angle .radians == 0.5);