Function GeocentricTranslation.tryFromComponents
Construct source-to-target translation parameters without throwing.
static bool tryFromComponents(
const T deltaX,
const T deltaY,
const T deltaZ,
out GeocentricTranslation!T result
) pure nothrow @nogc @safe;
Parameters
| Name | Description |
|---|---|
| deltaX | Finite X translation in the coordinate linear unit. |
| deltaY | Finite Y translation in the same linear unit. |
| deltaZ | Finite Z translation in the same linear unit. |
| result | Receives the translation on success. |
Returns
true when all parameters are finite; otherwise false. On
failure result is initialized to on entry and has no guaranteed value on failure.
Example
Example checking translation parameters without throwing.
import geodesy;
GeocentricTranslation!double shift;
assert(GeocentricTranslation!double .tryFromComponents(
84.87, 96.49, 116.95, shift));
assert(shift .deltaX == 84.87);