public AngleBetweenFloat()
        {
            var rnd = new RandomSystem(1);

            A.SetByIndex(i => rnd.UniformV3fDirection());
            angles.SetByIndex(i => rnd.UniformFloat() * (float)Constant.Pi);
            B.SetByIndex(i =>
            {
                V3f v;
                do
                {
                    v = rnd.UniformV3fDirection();
                }while (v.Dot(A[i]).IsTiny());

                V3f axis = v.Cross(A[i]).Normalized;

                return(M44f.Rotation(axis, angles[i]).TransformDir(A[i]));
            });
        }
Beispiel #2
0
 private static float RndAngle(RandomSystem rnd)
 => rnd.UniformFloat() * (float)Constant.Pi;
        //[GlobalSetup]
        public V2fLength()
        {
            var rnd1 = new RandomSystem(1);

            arr.SetByIndex(i => new V2f(rnd1.UniformFloat(), rnd1.UniformFloat()));
        }