Math.length

From GiderosMobile
Revision as of 14:28, 13 July 2023 by Hgy29 (talk | contribs) (Text replacement - "<source" to "<syntaxhighlight")

Available since: Gideros 2020.9
Class: math

Description

Returns the length of a vector. <syntaxhighlight lang="lua"> (number) = math.length(x,y,z) (number) = math.length({x,y,z}) (number) = math.length({x=x,y=y,z=z}) </source>

Parameters

x: (number) x component of the vector
y: (number) y component of the vector
z: (number) z component of the vector optional

Return values

Returns (number) the length of the vector