| 441 | //---------------------------------------------------------------------------- |
| 442 | |
| 443 | void clampPitchAngle(F32 &pitch) |
| 444 | { |
| 445 | // Clamp pitch to +/-MaxPitch, but allow pitch=PI as it is used by some editor |
| 446 | // views (bottom, front, right) |
| 447 | if ((pitch > MaxPitch) && !mIsEqual(pitch, M_PI_F, 0.001f)) |
| 448 | pitch = MaxPitch; |
| 449 | else if (pitch < -MaxPitch) |
| 450 | pitch = -MaxPitch; |
| 451 | } |
| 452 | |
| 453 | //---------------------------------------------------------------------------- |
| 454 |