Skip to content

Documentation / Vec2 / mag

mag() ​

ts
function mag(v): number;

Defined in: Utils/vec2.ts:111

Calculates the magnitude of a vector.

Parameters ​

v ​

Vec2

Returns ​

number

The magnitude of the vector.