From ad4a763d47951e7e7831ddb11cd29c8528e0e944 Mon Sep 17 00:00:00 2001 From: Zollerboy1 Date: Wed, 4 Mar 2020 15:05:32 +0100 Subject: [PATCH] fix glms_vec2_rotate() by using a dest vec2s instead of taking an axis vector (#122) --- include/cglm/struct/vec2.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/include/cglm/struct/vec2.h b/include/cglm/struct/vec2.h index e6ea945..ea62385 100644 --- a/include/cglm/struct/vec2.h +++ b/include/cglm/struct/vec2.h @@ -455,18 +455,18 @@ glms_vec2_normalize(vec2s v) { } /*! - * @brief rotate vec2 around axis by angle using Rodrigues' rotation formula + * @brief rotate vec2 by angle using Rodrigues' rotation formula * * @param[in] v vector - * @param[in] axis axis vector (must be unit vector) * @param[in] angle angle by radians * @returns rotated vector */ CGLM_INLINE vec2s -glms_vec2_rotate(vec2s v, float angle, vec2s axis) { - glm_vec2_rotate(v.raw, angle, axis.raw); - return v; +glms_vec2_rotate(vec2s v, float angle) { + vec2s r; + glm_vec2_rotate(v.raw, angle, r.raw); + return r; } /**