Commit 5761d7ec authored by Oliver Bock's avatar Oliver Bock

Make sure rotation reset is numerically correct

parent fa0156ac
......@@ -382,13 +382,13 @@ void PulsarAnimationWidget::stopAnimation()
void PulsarAnimationWidget::updateFrame()
{
m_pulsarRotationAngle += m_pulsarRotationDelta;
if(m_pulsarRotationAngle > 360) {
m_pulsarRotationAngle = 0.0f;
if(m_pulsarRotationAngle > 360.0f) {
m_pulsarRotationAngle -= 360.0f;
updatePulseProfile();
}
m_orbitRotationAngle += m_orbitRotationDelta;
if(m_orbitRotationAngle > 360) {
m_orbitRotationAngle = 0.0f;
if(m_orbitRotationAngle > 360.0f) {
m_orbitRotationAngle -= 360.0f;
}
updateGL();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment