gis-tools-ts - v0.6.0
    Preparing search index...

    Function angleFromS2Points

    • Return the angle between two points, which is also equal to the distance between these points on the unit sphere. The points do not need to be normalized. This function has a maximum error of 3.25 * DBL_EPSILON (or 2.5 * DBL_EPSILON for angles up to 1 radian). If either point is zero-length (e.g. an uninitialized S2Point), or almost zero-length, the resulting angle will be zero.

      Parameters

      • a: VectorPoint

        The first point

      • b: VectorPoint

        The second point

      Returns number

      • The angle between the two points in radians