Exemplo n.º 1
0
    public void Test_S2_GetPointToRightS1ChordAngle()
    {
        S2Point a         = S2LatLng.FromDegrees(0, 0).ToPoint();
        S2Point b         = S2LatLng.FromDegrees(0, 5).ToPoint(); // east
        S1Angle kDistance = S2Testing.MetersToAngle(10);

        S2Point c = S2.GetPointToRight(a, b, new S1ChordAngle(kDistance));

        Assert2.Near(new S1Angle(a, c).Radians, kDistance.Radians, 1e-15);
        // CAB must be a right angle with C to the right of AB.
        Assert2.Near(S2.TurnAngle(c, a, b), -S2.M_PI_2 /*radians*/, 1e-15);
    }