diff options
Diffstat (limited to 'animation.hpp')
-rw-r--r-- | animation.hpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/animation.hpp b/animation.hpp index 857354e..1689a0c 100644 --- a/animation.hpp +++ b/animation.hpp @@ -43,7 +43,7 @@ private: public: Animation(T L, unsigned w, int argc, char* argv[], unsigned wait, bool periodic = false) - : s₀⁻¹(0), wait(wait), L(1000 * L) { + : s₀⁻¹(L), wait(wait), L(1000 * L) { n = 0; glutInit(&argc, argv); @@ -72,10 +72,10 @@ public: glColor3d(1.0, 0.0, 0.0); glLineWidth(3); glBegin(GL_LINES); - Vector<double, D> r = (t->r.t).template cast<double>() / 2.0; + Vector<T, D> r = t->r.t / 2.0; double θ = atan2(r(1), r(0)); - Vector<double, D> v1 = s₀⁻¹.template act<double>({r(0) + L * sin(θ), r(1) - L * cos(θ)}); - Vector<double, D> v2 = s₀⁻¹.template act<double>({r(0) - L * sin(θ), r(1) + L * cos(θ)}); + Vector<T, D> v1 = s₀⁻¹.act({r(0) + L * sin(θ), r(1) - L * cos(θ)}); + Vector<T, D> v2 = s₀⁻¹.act({r(0) - L * sin(θ), r(1) + L * cos(θ)}); glVertex2d(v1(0), v1(1)); glVertex2d(v2(0), v2(1)); glEnd(); |