Function MolodenskyBadekas10.tryApply

Convert source geocentric XYZ to target-frame XYZ without throwing.

bool tryApply(
  const GeocentricCoordinate!T source,
  out GeocentricCoordinate!T result
) const pure nothrow @nogc @safe;

This uses the already prepared local-pivot transformation in its published forward direction. Returns false if the target cannot be represented in the selected scalar type.

Example

Example applying the identity transform without throwing.

import geodesy;
const source = GeocentricCoordinate!double.fromComponents(1.0, 2.0, 3.0);
GeocentricCoordinate!double target;
assert(PositionVectorMolodenskyBadekas!double.init.tryApply(source, target));
assert(target == source);