Skip to content
Snippets Groups Projects
Commit 5761d7ec authored by Oliver Bock's avatar Oliver Bock
Browse files

Make sure rotation reset is numerically correct

parent fa0156ac
No related branches found
No related tags found
No related merge requests found
......@@ -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();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment