From 8bc3591cd3219557c9d609b84cc8236091072f87 Mon Sep 17 00:00:00 2001 From: Behiri Date: Thu, 15 Aug 2024 04:11:10 -0700 Subject: [PATCH] Fix v2_rotate --- oogabooga/linmath.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/oogabooga/linmath.c b/oogabooga/linmath.c index 3ad933b..efd990d 100644 --- a/oogabooga/linmath.c +++ b/oogabooga/linmath.c @@ -181,15 +181,11 @@ Vector2 v2_rotate_point_around_pivot(Vector2 point, Vector2 pivot, float32 rotat float32 s = sin(rotation_radians); float32 c = cos(rotation_radians); - point.x -= pivot.x; - point.y -= pivot.y; point = v2_sub(point, pivot); float32 x_new = point.x * c - point.y * s; float32 y_new = point.x * s + point.y * c; - point.x = x_new + pivot.x; - point.y = y_new + pivot.y; point = v2_add(v2(x_new, y_new), pivot); return point;