From ad8012c89bb5daabcebdb13263852fa5ee910d9d Mon Sep 17 00:00:00 2001 From: Max Cahill <1bardesign@gmail.com> Date: Mon, 9 Aug 2021 19:27:29 +1000 Subject: [PATCH] added normalize alias for americans to vec2 --- vec2.lua | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/vec2.lua b/vec2.lua index 32656ee..c6bba9c 100644 --- a/vec2.lua +++ b/vec2.lua @@ -479,6 +479,11 @@ vec2.mul_inplace = vec2.vector_mul_inplace vec2.div_inplace = vec2.vector_div_inplace vec2.set = vec2.vector_set +--american spelling alias +vec2.normalize_both_inplace = vec2.normalise_both_inplace +vec2.normalize_inplace = vec2.normalise_inplace +vec2.normalize_len_inplace = vec2.normalise_len_inplace + --garbage generating functions that return a new vector rather than modifying self for _, inplace_name in ipairs({ "vector_add_inplace", @@ -497,6 +502,9 @@ for _, inplace_name in ipairs({ "normalise_both_inplace", "normalise_inplace", "normalise_len_inplace", + "normalize_both_inplace", + "normalize_inplace", + "normalize_len_inplace", "inverse_inplace", "rotate_inplace", "rotate_around_inplace", @@ -558,6 +566,7 @@ for _, v in ipairs({ {"lerp", "lerp"}, {"rotate", "rotate"}, {"normalise", "normalise"}, + {"normalize", "normalize"}, }) do local shorthand, original = v[1], v[2] if vec2[shorthand] == nil then