From 7dc54ddfe54f3cf578aaf73e946a9bfb6c5eb41f Mon Sep 17 00:00:00 2001 From: Karma Riuk Date: Sat, 25 Mar 2023 14:03:07 +0100 Subject: [PATCH] Made the angular speed a double --- polygons.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/polygons.h b/polygons.h index ca26ce2..afa3298 100644 --- a/polygons.h +++ b/polygons.h @@ -18,7 +18,9 @@ class polygon { std::vector points; std::vector global_points = points; - vec2d speed, angular_speed; + vec2d speed; + double angular_speed; + double mass = 1; void draw(cairo_t* cr) const; void draw_bounding_rect(cairo_t* cr) const; @@ -51,7 +53,7 @@ class polygon { return *this; } - polygon& set_angular_speed(vec2d as) { + polygon& set_angular_speed(double as) { angular_speed = as; return *this; }