mirror of
https://github.com/1bardesign/batteries.git
synced 2024-11-22 06:04:35 +00:00
added normalize alias for americans to vec2
This commit is contained in:
parent
918c9438cd
commit
ad8012c89b
9
vec2.lua
9
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
|
||||
|
Loading…
Reference in New Issue
Block a user