Vector.max
From GiderosMobile
Revision as of 12:52, 3 February 2026 by MoKaLux (talk | contribs) (Created page with "__NOTOC__ '''Available since:''' Gideros 2026.1<br/> '''Class:''' vector library<br/> === Description === Applies ''math.max'' to the corresponding components of the inpu...")
Available since: Gideros 2026.1
Class: vector library
Description
Applies math.max to the corresponding components of the input vectors.
(vector) = vector.max(...)
Equivalent to vector.create(math.max((...).x), math.max((...).y), math.max((...).z)).
Parameters
...: (vector) one or more input vectors
Return values
Returns (vector) returns the new vector with math.max applied to every components of the vectors
Example
local vec1 : vector = vector.create(1, -2.5, 3)
local vec2 : vector = vector.create(2, -1, 6)
local vec3 : vector = vector.create(1, 0, 1)
local ma = vector.max(vec1, vec2, vec3)
print(typeof(ma), ma) -- vector 2, 0, 6