Skip to content

aninest root / Vec2 / distanceTo

distanceTo()

ts
function distanceTo(v1, v2): number

Calculates the distance between two vectors.

Parameters

v1: Vec2

The first vector.

v2: Vec2

The second vector.

Returns

number

A scalar.

Defined in

Utils/vec2.ts:198