Vector.abs
From GiderosMobile
Available since: Gideros 2026.1
Class: vector library
Description
Applies math.abs to every components of the input vector.
(vector) = vector.abs(vec)
Parameters
vec: (vector) the input vector
Return values
Returns (vector) returns the new vector with math.abs applied to every components
Example
local vec : vector = vector.create(1, -2.5, 3)
local ab = vector.abs(vec)
print(typeof(ab), ab) -- vector 1, 2.5, 3