fractionOfProjectionToVector Method

Return fractional length of the projection of the instance onto the target vector.

fractionOfProjectionToVector(target: Vector2d, defaultFraction?: number): number

@returns the signed length of the projection divided by the length of target

Parameter Type Description
target Vector2d the target vector
defaultFraction number the returned value in case the magnitude of target is too small

Returns - number

the signed length of the projection divided by the length of target

Defined in

Last Updated: 17 December, 2024