예제 #1
0
 // Multiplies every component of this vector by the same component of /scale/.
 public void Scale(Vector7 scale)
 {
     a *= scale.a;
     b *= scale.b;
     c *= scale.c;
     d *= scale.d;
     e *= scale.e;
     f *= scale.f;
     g *= scale.g;
 }
예제 #2
0
 // Linearly interpolates between two vectors without clamping the interpolant
 public static Vector7 LerpUnclamped(Vector7 a, Vector7 b, float t)
 {
     return(new Vector7(
                a.a + (b.a - a.a) * t,
                a.b + (b.b - a.b) * t,
                a.c + (b.c - a.c) * t,
                a.d + (b.d - a.d) * t,
                a.e + (b.e - a.e) * t,
                a.f + (b.f - a.f) * t,
                a.g + (b.g - a.g) * t
                ));
 }
예제 #3
0
 // Linearly interpolates between two vectors.
 public static Vector7 Lerp(Vector7 a, Vector7 b, float t)
 {
     t = Mathf.Clamp01(t);
     return(new Vector7(
                a.a + (b.a - a.a) * t,
                a.b + (b.b - a.b) * t,
                a.c + (b.c - a.c) * t,
                a.d + (b.d - a.d) * t,
                a.e + (b.e - a.e) * t,
                a.f + (b.f - a.f) * t,
                a.g + (b.g - a.g) * t
                ));
 }
예제 #4
0
 public bool Equals(Vector7 other)
 {
     return(a == other.a && b == other.b && c == other.c && d == other.d && e == other.e && f == other.f && g == other.g);
 }
예제 #5
0
 // Multiplies two vectors component-wise.
 public static Vector7 Scale(Vector7 a, Vector7 b)
 {
     return(new Vector7(a.a * b.a, a.b * b.b, a.c * b.c, a.d * b.d, a.e * b.e, a.f * b.f, a.g * b.g));
 }