Function UpsCoordinate.tryFromComponents
Construct a tagged UPS coordinate without throwing.
static bool tryFromComponents(
const UpsHemisphere hemisphere,
const T easting,
const T northing,
out UpsCoordinate result
) pure nothrow @nogc @safe;
Example
Example checking UPS coordinate construction.
import geodesy;
UpsCoordinate!double coordinate;
assert(UpsCoordinate!double .tryFromComponents(
UpsHemisphere .south,
2_000_000.0,
2_000_000.0,
coordinate));
assert(coordinate .hemisphere == UpsHemisphere .south);