Permalink
Browse files

Merge branch 'pr/84' into develop

  • Loading branch information...
2 parents 2a97192 + 6171310 commit e4fd62c0ff1b23bde41bdf58c3059c2db788814a @thefiddler thefiddler committed Mar 31, 2014
@@ -1063,6 +1063,19 @@ public static void Transform(ref Vector2 vec, ref Quaternion quat, out Vector2 r
}
/// <summary>
+ /// Component-wise multiplication between the specified instance by a scale vector.
+ /// </summary>
+ /// <param name="scale">Left operand.</param>
+ /// <param name="vec">Right operand.</param>
+ /// <returns>Result of multiplication.</returns>
+ public static Vector2 operator *(Vector2 vec, Vector2 scale)
+ {
+ vec.X *= scale.X;
+ vec.Y *= scale.Y;
+ return vec;
+ }
+
+ /// <summary>
/// Divides the specified instance by a scalar.
/// </summary>
/// <param name="vec">Left operand</param>
@@ -925,6 +925,19 @@ public static void Transform(ref Vector2d vec, ref Quaterniond quat, out Vector2
}
/// <summary>
+ /// Component-wise multiplication between the specified instance by a scale vector.
+ /// </summary>
+ /// <param name="scale">Left operand.</param>
+ /// <param name="vec">Right operand.</param>
+ /// <returns>Result of multiplication.</returns>
+ public static Vector2d operator *(Vector2d vec, Vector2d scale)
+ {
+ vec.X *= scale.X;
+ vec.Y *= scale.Y;
+ return vec;
+ }
+
+ /// <summary>
/// Divides an instance by a scalar.
/// </summary>
/// <param name="vec">The instance.</param>
@@ -1374,6 +1374,20 @@ public static void CalculateAngle(ref Vector3 first, ref Vector3 second, out flo
}
/// <summary>
+ /// Component-wise multiplication between the specified instance by a scale vector.
+ /// </summary>
+ /// <param name="scale">Left operand.</param>
+ /// <param name="vec">Right operand.</param>
+ /// <returns>Result of multiplication.</returns>
+ public static Vector3 operator *(Vector3 vec, Vector3 scale)
+ {
+ vec.X *= scale.X;
+ vec.Y *= scale.Y;
+ vec.Z *= scale.Z;
+ return vec;
+ }
+
+ /// <summary>
/// Divides an instance by a scalar.
/// </summary>
/// <param name="vec">The instance.</param>
@@ -1370,7 +1370,21 @@ public static void CalculateAngle(ref Vector3d first, ref Vector3d second, out d
vec.Z *= scale;
return vec;
}
-
+
+ /// <summary>
+ /// Component-wise multiplication between the specified instance by a scale vector.
+ /// </summary>
+ /// <param name="scale">Left operand.</param>
+ /// <param name="vec">Right operand.</param>
+ /// <returns>Result of multiplication.</returns>
+ public static Vector3d operator *(Vector3d vec, Vector3d scale)
+ {
+ vec.X *= scale.X;
+ vec.Y *= scale.Y;
+ vec.Z *= scale.Z;
+ return vec;
+ }
+
/// <summary>
/// Divides an instance by a scalar.
/// </summary>
@@ -1490,7 +1490,22 @@ public static void Transform(ref Vector4 vec, ref Quaternion quat, out Vector4 r
vec.W *= scale;
return vec;
}
-
+
+ /// <summary>
+ /// Component-wise multiplication between the specified instance by a scale vector.
+ /// </summary>
+ /// <param name="scale">Left operand.</param>
+ /// <param name="vec">Right operand.</param>
+ /// <returns>Result of multiplication.</returns>
+ public static Vector4 operator *(Vector4 vec, Vector4 scale)
+ {
+ vec.X *= scale.X;
+ vec.Y *= scale.Y;
+ vec.Z *= scale.Z;
+ vec.W *= scale.W;
+ return vec;
+ }
+
/// <summary>
/// Divides an instance by a scalar.
/// </summary>
@@ -1493,6 +1493,21 @@ public static void Transform(ref Vector4d vec, ref Quaterniond quat, out Vector4
vec.W *= scale;
return vec;
}
+
+ /// <summary>
+ /// Component-wise multiplication between the specified instance by a scale vector.
+ /// </summary>
+ /// <param name="scale">Left operand.</param>
+ /// <param name="vec">Right operand.</param>
+ /// <returns>Result of multiplication.</returns>
+ public static Vector4d operator *(Vector4d vec, Vector4d scale)
+ {
+ vec.X *= scale.X;
+ vec.Y *= scale.Y;
+ vec.Z *= scale.Z;
+ vec.W *= scale.W;
+ return vec;
+ }
/// <summary>
/// Divides an instance by a scalar.

0 comments on commit e4fd62c

Please sign in to comment.