MCPcopy Create free account
hub / github.com/TorqueGameEngines/Torque3D / clampPitchAngle

Function clampPitchAngle

Engine/source/T3D/camera.cpp:443–451  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

441//----------------------------------------------------------------------------
442
443void 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

Callers 1

processTickMethod · 0.85

Calls 1

mIsEqualFunction · 0.85

Tested by

no test coverage detected