public static void Lerp(out idVec5 t, idVec5 v1, idVec5 v2, float l)
 {
     if (l <= 0.0f) t = v1;
     else if (l >= 1.0f) t = v2;
     else
     {
         t.x = v1.x + l * (v2.x - v1.x);
         t.y = v1.y + l * (v2.y - v1.y);
         t.z = v1.z + l * (v2.z - v1.z);
         t.s = v1.s + l * (v2.s - v1.s);
         t.t = v1.t + l * (v2.t - v1.t);
     }
 }
Beispiel #2
0
 public static void Lerp(out idVec5 t, idVec5 v1, idVec5 v2, float l)
 {
     if (l <= 0.0f)
     {
         t = v1;
     }
     else if (l >= 1.0f)
     {
         t = v2;
     }
     else
     {
         t.x = v1.x + l * (v2.x - v1.x);
         t.y = v1.y + l * (v2.y - v1.y);
         t.z = v1.z + l * (v2.z - v1.z);
         t.s = v1.s + l * (v2.s - v1.s);
         t.t = v1.t + l * (v2.t - v1.t);
     }
 }
Beispiel #3
0
 public bool Compare(ref idVec5 a, float epsilon)
 {
     return(idMath.Fabs(x - a.x) <= epsilon && idMath.Fabs(y - a.y) <= epsilon && idMath.Fabs(z - a.z) <= epsilon && idMath.Fabs(s - a.s) <= epsilon && idMath.Fabs(t - a.t) <= epsilon);
 }
Beispiel #4
0
 public bool Compare(ref idVec5 a)
 {
     return(x == a.x && y == a.y && z == a.z && s == a.s && t == a.t);
 }
Beispiel #5
0
 public idVec5 opDiv(idVec5 a)
 {
     x /= a.x; y /= a.y; z /= a.z; s /= a.s; t /= a.t; return(this);
 }
Beispiel #6
0
 public idVec5 opSub(idVec5 a)
 {
     x -= a.x; y -= a.y; z -= a.z; s -= a.s; t -= a.t; return(this);
 }
Beispiel #7
0
 public idVec5 opAdd(idVec5 a)
 {
     x += a.x; y += a.y; z += a.z; s += a.s; t += a.t; return(this);
 }
 public bool Compare(ref idVec5 a, float epsilon) { return (idMath.Fabs(x - a.x) <= epsilon && idMath.Fabs(y - a.y) <= epsilon && idMath.Fabs(z - a.z) <= epsilon && idMath.Fabs(s - a.s) <= epsilon && idMath.Fabs(t - a.t) <= epsilon); }
 public bool Compare(ref idVec5 a) { return (x == a.x && y == a.y && z == a.z && s == a.s && t == a.t); }
 public idVec5 opDiv(idVec5 a) { x /= a.x; y /= a.y; z /= a.z; s /= a.s; t /= a.t; return this; }
 public idVec5 opSub(idVec5 a) { x -= a.x; y -= a.y; z -= a.z; s -= a.s; t -= a.t; return this; }
 public idVec5 opAdd(idVec5 a) { x += a.x; y += a.y; z += a.z; s += a.s; t += a.t; return this; }