Function Latitude.fromDegrees

Make a north/south geographic latitude from degrees.

static Latitude fromDegrees(
  const T degrees
) @safe;

Use this for the latitude of a position. Values must lie between -90 degrees (South Pole) and +90 degrees (North Pole).

Parameters

NameDescription
degrees Latitude in the closed interval [-90,+90] degrees.

Returns

The constructed latitude.

Throws

GeodesyValueException for non-finite or out-of-domain input.

Example

Example constructing a latitude from degrees.

import geodesy;
const latitude = Latitude!double.fromDegrees(48.20849);
assert(latitude.degrees > 48.0);