Skip to content

aninest root / Vec2 / mapVec

mapVec()

ts
function mapVec(v, func): Vec2

Calls a function func on each component of a vector, creating a new vector from the result of each function call.

Parameters

v: Vec2

func

Returns

Vec2

A new vector.

Defined in

Utils/vec2.ts:213