Library to implement 3D vector algebra
npm install vector3d




Just another Javascript implementation of immutable 3D vectors.
``html`
`bash`
npm install vector3d
`javascript
// Create vectors by assigning each coordinate.
const v1 = Vector3d(1.2, 3.4, 5.6)
const v2 = Vector3d(7.8, 9.1, 2.3)
// Set/return Cartesian coordinates.
v1.x()
// => 1.2
v2.x(4.5)
// => Vector3d(4.5, 3.4, 5.6)
// Add/subtract two vectors.
v1.add(v2)
// => Vector3d(9.0, 12.5, 7.9)
v1.sub(v2)
// => Vector3d(-6.6, -5.7, 3.3)
``
At the moment, documentation is available in the source code.