fractionOfProjectionToVector Method

Return fractional projection of this vector on the target vector.

  • It's returning the signed projection magnitude divided by the target magnitude.
  • To find the projection vector, scale the target vector by the value that this function is returning.
  • math details can be found at docs/learning/geometry/PointVector.md

fractionOfProjectionToVector(target: Vector3d, defaultFraction: number = 0): number

Parameter Type Description
target Vector3d the target vector
defaultFraction number the returned value in case magnitude square of target vector is very small

Returns - number

Defined in

Last Updated: 20 June, 2023