Skip to content

Add magnitude shortcut for Vector and Vector2D#30

Open
ekaliclua wants to merge 3 commits intonanos-world:masterfrom
ekaliclua:patch-2
Open

Add magnitude shortcut for Vector and Vector2D#30
ekaliclua wants to merge 3 commits intonanos-world:masterfrom
ekaliclua:patch-2

Conversation

@ekaliclua
Copy link

Usage:

local vec3 = Vector(2, 3, 4)
print(#vec3) -- 5.38516480713

local vec2 = Vector2D(3, 4)
print(#vec2) -- 5.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant