Vector3:apply

From Wake
Jump to: navigation, search

Create a new vector by applying a function to each element of the current vector.

Function

Synopsis

result = Vector3:apply(f)

Arguments

function f

The function to apply to each element. It can take up to 2 arguments, with the first being the element value and the second being the element index.

Returns

Vector3 result

The result of applying the function f to each element of the vector.

See Also