Math module

max

procedure · 3 overloadsSource

The component-wise maximum of two vectors. For scalars use the max of the Basic module.

ExampleOpen in playground ↗
assert(max(xyz(1, 5, 3), xyz(4, 2, 6)) == xyz(4, 5, 6));
max :: (v1: Vector2, v2: Vector2) -> Vector2

The larger of each pair of components.

Parameters

v1: Vector2
the first vector.
v2: Vector2
the second vector.

Returns

max :: (v1: Vector3, v2: Vector3) -> Vector3

The larger of each pair of components.

Parameters

v1: Vector3
the first vector.
v2: Vector3
the second vector.

Returns

max :: (v1: Vector4, v2: Vector4) -> Vector4

The larger of each pair of components.

Parameters

v1: Vector4
the first vector.
v2: Vector4
the second vector.

Returns

See also