Vector.max

From GiderosMobile

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