@vaguevoid/fiasco / math/vector / clampMagnitude
Function: clampMagnitude()
clampMagnitude(
origin
,target
,max
):object
Defined in: src/math/vector.ts:17
Parameters
origin
xy coordinate representing the start of the vector
target
xy coordinate representing the end of the vector
max
number
inclusive maximum magnitude of the vector
Returns
object
vector clamped to this magnitude
x
x:
number
y
y:
number