From a1c5f64f3c8c9812cb0b4658630f79dab1856c0c Mon Sep 17 00:00:00 2001 From: Jaron Kent-Dobias Date: Tue, 25 Feb 2020 19:40:35 -0500 Subject: Fance inheritance --- animation.hpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'animation.hpp') 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 r = (t->r.t).template cast() / 2.0; + Vector r = t->r.t / 2.0; double θ = atan2(r(1), r(0)); - Vector v1 = s₀⁻¹.template act({r(0) + L * sin(θ), r(1) - L * cos(θ)}); - Vector v2 = s₀⁻¹.template act({r(0) - L * sin(θ), r(1) + L * cos(θ)}); + Vector v1 = s₀⁻¹.act({r(0) + L * sin(θ), r(1) - L * cos(θ)}); + Vector v2 = s₀⁻¹.act({r(0) - L * sin(θ), r(1) + L * cos(θ)}); glVertex2d(v1(0), v1(1)); glVertex2d(v2(0), v2(1)); glEnd(); -- cgit v1.2.3-54-g00ecf