Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
einsteinathome
pulsatingscience
Commits
4ba0eaf2
Commit
4ba0eaf2
authored
Dec 01, 2008
by
Oliver Bock
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improved accuracy
parent
032592bb
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
src/pulsaranimationwidget.cpp
src/pulsaranimationwidget.cpp
+3
-3
No files found.
src/pulsaranimationwidget.cpp
View file @
4ba0eaf2
...
...
@@ -255,7 +255,7 @@ void PulsarAnimationWidget::updateCameraPosition(const int angleH, const int ang
m_cameraPosX
=
sin
(
angleH
*
deg2rad
)
*
zoom
;
m_cameraPosY
=
sin
(
angleV
*
deg2rad
)
*
zoom
;
m_cameraPosZ
=
cos
(
angleH
*
deg2rad
)
*
cos
(
abs
(
angleV
*
deg2rad
))
*
zoom
;
m_cameraPosZ
=
cos
(
angleH
*
deg2rad
)
*
cos
(
f
abs
(
angleV
*
deg2rad
))
*
zoom
;
updateGL
();
}
...
...
@@ -267,7 +267,7 @@ void PulsarAnimationWidget::setFramePerSecond(const unsigned int fps)
void
PulsarAnimationWidget
::
setPulsarSpinFrequency
(
const
float
frequency
)
{
m_pulsarSpinFrequency
=
(
unsigned
int
)
(
1000
/
(
frequency
*
360.0
f
));
m_pulsarSpinFrequency
=
(
unsigned
int
)
(
1000
/
(
frequency
*
360.0
f
)
+
0.5
f
);
m_pulsarSpinTimer
.
setInterval
(
m_pulsarSpinFrequency
);
}
...
...
@@ -279,6 +279,6 @@ void PulsarAnimationWidget::setOrbitRadius(const float radius)
void
PulsarAnimationWidget
::
setOrbitFrequency
(
const
float
frequency
)
{
m_orbitFrequency
=
(
unsigned
int
)
(
1000
/
(
frequency
*
360.0
f
));
m_orbitFrequency
=
(
unsigned
int
)
(
1000
/
(
frequency
*
360.0
f
)
+
0.5
f
);
m_orbitTimer
.
setInterval
(
m_orbitFrequency
);
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment