fractionOfProjectionToVector Method
Return fractional length of the projection of the instance onto the target vector.
- To find the projection vector, scale the target vector by the return value.
- Math details can be found at docs/learning/geometry/PointVector.md
- Visualization can be found at https://www.itwinjs.org/sandbox/SaeedTorabi/ProjectVectorOnVector and https://www.itwinjs.org/sandbox/SaeedTorabi/ProjectVectorOnPlane
fractionOfProjectionToVector(target: Vector3d, defaultFraction: number0): number
@returns the signed length of the projection divided by the length of target
Parameter | Type | Description |
---|---|---|
target | Vector3d | 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
- geometry3d/Point3dVector3d.ts Line 1007
Last Updated: 21 November, 2024
Found something wrong, missing, or unclear on this page?Raise an issue in our repo.