S3D.geometry


This namespace provides helpful tool when working with geometry.

tip

If you have any ideas for helpful functions, let us know!


S3D.geometry.degreesBetweenVectors#

Description: Get the angle between two vectors in degrees.

Operation Type: Synchronous

Params: S3D.geometry.degreesBetweenVectors(vectorOne, vectorTwo)

KeyTypeDescription
vectorOneArrayThe first vector to check in the format [x, y, z].
vectorTwoArrayThe second vector to check in the format [x, y, z].

Sample:

degreesBetweenVectors.js
S3D.geometry.degreesBetweenVectors([0, 1, 0], [1, 0.7, 0]);

S3D.geometry.radiansBetweenVectors#

Description: Get the angle between two vectors in radians.

Operation Type: Synchronous

Params: S3D.geometry.radiansBetweenVectors(vectorOne, vectorTwo)

KeyTypeDescription
vectorOneArrayThe first vector to check in the format [x, y, z].
vectorTwoArrayThe second vector to check in the format [x, y, z].

Sample:

radiansBetweenVectors.js
S3D.geometry.radiansBetweenVectors([0, 1, 0], [1, 0.7, 0]);