Esempio n. 1
0
 //
 // Summary:
 //     Multiplies a 3-D vector by a System.Single value.
 //
 // Parameters:
 //   source:
 //     Source Vector3d structure.
 //
 //   f:
 //     Source System.Single value used as a multiplier.
 //
 // Returns:
 //     A Vector3d structure that is multiplied by the System.Single
 //     value.
 public static Vector3d Multiply(Vector3d source, double f)
 {
     var result = new Vector3d(source);
     result.Multiply(f);
     return result;
 }
Esempio n. 2
0
        public static Vector3d MidPointByLength(Vector3d left, Vector3d right)
        {
            var result = new Vector3d((left.X + right.X) / 2, (left.Y + right.Y) / 2, (left.Z + right.Z) / 2);
            result.Normalize();

            result.Multiply(left.Length());
            return result;
        }