Ejemplo n.º 1
0
    private static S2Point PerturbAtDistance(S1Angle distance, S2Point a0, S2Point b0)
    {
        S2Point x = S2.InterpolateAtDistance(distance, a0, b0);

        if (S2Testing.Random.OneIn(2))
        {
            for (int i = 0; i < 3; ++i)
            {
                x = x.SetAxis(i, MathUtils.NextAfter(x[i], S2Testing.Random.OneIn(2) ? 1 : -1));
            }
            x = x.Normalize();
        }
        return(x);
    }