Пример #1
0
 public static float Dot(MVector v1, MVector v2)
 {
     return(v1.X * v2.X + v1.Y * v2.Y + v1.Z * v2.Z + v1.W * v2.W);
 }
Пример #2
0
 public static MVector Lerp(MVector v1, MVector v2, float t)
 {
     return(new MVector(Utils.Lerp(v1.X, v2.X, t), Utils.Lerp(v1.Y, v2.Y, t), Utils.Lerp(v1.Z, v2.Z, t), Utils.Lerp(v1.W, v2.W, t)));
 }
Пример #3
0
 public MVector Clamp(MVector min, MVector max)
 {
     return(new MVector(Math.Min(max.X, Math.Max(min.X, X)), Math.Min(max.Y, Math.Max(min.Y, Y)), Math.Min(max.Z, Math.Max(min.Z, Z)), Math.Min(max.W, Math.Max(min.W, W))));
 }