public __rtype__ DistanceFast()
        {
            __rtype__ sum = 0;

            for (int i = 0; i < count; i++)
            {
                sum += A[i].DistanceFast(B[i]);
            }

            return(sum);
        }
Ejemplo n.º 2
0
        public __rtype__ Pow()
        {
            __rtype__ sum = 0;

            for (int i = 0; i < count; i++)
            {
                sum += numbers[i].Pow((__rtype__)exponents[i]);
            }

            return(sum);
        }
        public __rtype__ AngleBetweenStable()
        {
            __rtype__ sum = 0;

            for (int i = 0; i < count; i++)
            {
                sum += A[i].AngleBetween(B[i]);
            }

            return(sum);
        }
        public DistanceRot3__fc__()
        {
            var rnd = new RandomSystem(1);

            A.SetByIndex(i => RndRot(rnd));
            angles.SetByIndex(i =>
            {
                __rtype__ a = 0;
                do
                {
                    a = RndAngle(rnd);
                }while (a == 0);

                return(a);
            });

            B.SetByIndex(i =>
            {
                var r = __rot3t__.Rotation(RndAxis(rnd), angles[i]);
                return(r * A[i]);
            });
        }
Ejemplo n.º 5
0
 public static bool ApproximateEquals(this __type__ a, __type__ b, __rtype__ epsilon)
 => a.Forward.ApproximateEquals(b.Forward, epsilon) && a.Backward.ApproximateEquals(b.Backward, epsilon);