Advance the oscillation phase by deltaTime seconds, wrapped to [0, 2π).
Wrapping keeps the phase small no matter how long the viewer is left
running: sin is periodic, so the wrap is exact, while an ever-growing
radian count would bleed precision out of the sine after a few hours.
A non-finite or non-positive period is inert (phase unchanged) rather than
an error: this runs inside the render loop, and a hand-edited scene attribute
should stop the motion, not produce NaN and freeze the camera at an
unrecoverable position.
Advance the oscillation phase by
deltaTimeseconds, wrapped to[0, 2π).Wrapping keeps the phase small no matter how long the viewer is left running:
sinis periodic, so the wrap is exact, while an ever-growing radian count would bleed precision out of the sine after a few hours.A non-finite or non-positive
periodis inert (phase unchanged) rather than an error: this runs inside the render loop, and a hand-edited scene attribute should stop the motion, not produceNaNand freeze the camera at an unrecoverable position.