예제 #1
0
        public static Vector3d Normalize(Vector3d value)
        {
            double num = Vector3d.Magnitude(value);

            if (num > 9.99999974737875E-06)
            {
                return(value / num);
            }
            else
            {
                return(Vector3d.zero);
            }
        }
예제 #2
0
        public void Normalize()
        {
            double num = Vector3d.Magnitude(this);

            if (num > 9.99999974737875E-06)
            {
                this = this / num;
            }
            else
            {
                this = Vector3d.zero;
            }
        }
예제 #3
0
        public static Vector3d Normalize(Vector3d value)
        {
            double magnitude = value.Magnitude();

            if (magnitude > 9.9999997473787516E-06)
            {
                return(value / magnitude);
            }
            else
            {
                return(zero);
            }
        }
예제 #4
0
        public static Vector3d Normalize(Vector3d value)
        {
            var invLength = 1.0 / value.Magnitude();

            return(new Vector3d(value.x * invLength, value.y * invLength, value.z * invLength));
        }