Sprotty
Toggle Dark/Light/Auto modeToggle Dark/Light/Auto modeToggle Dark/Light/Auto modeBack to homepage

Point. Function.shift Towards

sprotty-protocol / Point / shiftTowards

Function: shiftTowards()

shiftTowards(point, refPoint, distance): Point

Defined in: utils/geometry.ts:78

Computes a point that is the original point shifted towards refPoint by the given distance.

Parameters

point

Point

Point to shift

refPoint

Point

Point to shift towards

distance

number

Distance to shift

Returns

Point