Skip to content

editor / add

Function: add() ​

add(point, vector): Point

Defined in: math/add.ts:16

Point moved by a vector, component-wise.

Formula: p + v = (pₓ + vₓ, p_y + v_y) — vector addition, the point being read as its vector from the origin.

Parameters ​

point ​

Point

start point

vector ​

Vector

displacement

Returns ​

Point

the moved point

Kind ​

math

See ​

REF-MATHWORLD-VECTOR-ADDITION