closestGeodesicIntersection - multiple declarations

Function closestGeodesicIntersection

Throwing prepared-line closest intersection.

GeodesicClosestIntersectionResult!T closestGeodesicIntersection(T)(
  const Geodesic!T solver,
  const GeodesicLine!T firstLine,
  const GeodesicLine!T secondLine,
  const T referenceOnFirst = cast(T)0,
  const T referenceOnSecond = cast(T)0
) @safe
if (isGeodesyScalar!T);

Function closestGeodesicIntersection

Throwing prepared-state closest intersection for prepared lines.

GeodesicClosestIntersectionResult!T closestGeodesicIntersection(T)(
  const GeodesicIntersectionSolver!T intersector,
  const GeodesicLine!T firstLine,
  const GeodesicLine!T secondLine,
  const T referenceOnFirst = cast(T)0,
  const T referenceOnSecond = cast(T)0
) @safe
if (isGeodesyScalar!T);

Function closestGeodesicIntersection

Throwing prepared-state closest intersection for line definitions.

GeodesicClosestIntersectionResult!T closestGeodesicIntersection(T)(
  const GeodesicIntersectionSolver!T intersector,
  const GeographicCoordinate!T firstStart,
  const Angle!T firstAzimuth,
  const GeographicCoordinate!T secondStart,
  const Angle!T secondAzimuth,
  const T referenceOnFirst = cast(T)0,
  const T referenceOnSecond = cast(T)0
) @safe
if (isGeodesyScalar!T);

Function closestGeodesicIntersection

Throwing origin/azimuth closest intersection.

GeodesicClosestIntersectionResult!T closestGeodesicIntersection(T)(
  const Geodesic!T solver,
  const GeographicCoordinate!T firstStart,
  const Angle!T firstAzimuth,
  const GeographicCoordinate!T secondStart,
  const Angle!T secondAzimuth,
  const T referenceOnFirst = cast(T)0,
  const T referenceOnSecond = cast(T)0
) @safe
if (isGeodesyScalar!T);

Example

Example finding the closest intersection of two oriented geodesics.

const solver = Geodesic!double.fromEllipsoid(wgs84!double());
const firstStart = GeographicCoordinate!double.fromComponents(
    Latitude!double.fromDegrees(0.0),
    Longitude!double.fromDegrees(-20.0));
const secondStart = GeographicCoordinate!double.fromComponents(
    Latitude!double.fromDegrees(10.0),
    Longitude!double.fromDegrees(20.0));
const result = closestGeodesicIntersection(
    solver, firstStart, Angle!double.fromDegrees(45.0),
    secondStart, Angle!double.fromDegrees(-60.0));
assert(result.isValid);
assert(result.coincidence == GeodesicIntersectionCoincidence.distinct);