Пример #1
0
 public bool Compare(ref idAngles a, float epsilon)
 {
     return !(
         (idMath.Fabs(pitch - a.pitch) > epsilon) ||
         (idMath.Fabs(yaw - a.yaw) > epsilon) ||
         (idMath.Fabs(roll - a.roll) > epsilon));
 }
Пример #2
0
 public idAngles opSub(idAngles a)
 {
     pitch -= a.pitch;
     yaw -= a.yaw;
     roll -= a.roll;
     return this;
 }
Пример #3
0
 public idAngles opAdd(ref idAngles a)
 {
     pitch += a.pitch;
     yaw   += a.yaw;
     roll  += a.roll;
     return(this);
 }
Пример #4
0
 public idAngles opAdd(ref idAngles a)
 {
     pitch += a.pitch;
     yaw += a.yaw;
     roll += a.roll;
     return this;
 }
Пример #5
0
 public void Clamp(ref idAngles min, ref idAngles max)
 {
     if (pitch < min.pitch)
     {
         pitch = min.pitch;
     }
     else if (pitch > max.pitch)
     {
         pitch = max.pitch;
     }
     if (yaw < min.yaw)
     {
         yaw = min.yaw;
     }
     else if (yaw > max.yaw)
     {
         yaw = max.yaw;
     }
     if (roll < min.roll)
     {
         roll = min.roll;
     }
     else if (roll > max.roll)
     {
         roll = max.roll;
     }
 }
Пример #6
0
 public bool Compare(ref idAngles a, float epsilon)
 {
     return(!(
                (idMath.Fabs(pitch - a.pitch) > epsilon) ||
                (idMath.Fabs(yaw - a.yaw) > epsilon) ||
                (idMath.Fabs(roll - a.roll) > epsilon)));
 }
Пример #7
0
 public idAngles opSub(idAngles a)
 {
     pitch -= a.pitch;
     yaw   -= a.yaw;
     roll  -= a.roll;
     return(this);
 }
Пример #8
0
 public bool Compare(ref idAngles a) { return (a.pitch == pitch && a.yaw == yaw && a.roll == roll); }
Пример #9
0
 public void Clamp(ref idAngles min, ref idAngles max)
 {
     if (pitch < min.pitch) pitch = min.pitch;
     else if (pitch > max.pitch) pitch = max.pitch;
     if (yaw < min.yaw) yaw = min.yaw;
     else if (yaw > max.yaw) yaw = max.yaw;
     if (roll < min.roll) roll = min.roll;
     else if (roll > max.roll) roll = max.roll;
 }
Пример #10
0
 public bool Compare(ref idAngles a)
 {
     return(a.pitch == pitch && a.yaw == yaw && a.roll == roll);
 }