예제 #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);
 }