1.0.5 • Published 3 years ago

vector3d v1.0.5

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

Build Status Coverage Status npm License JavaScript Style Guide

vector3d

Just another Javascript implementation of immutable 3D vectors.

install

browser

<script type="text/javascript" src="vector3d.min.js"></script>

node

npm install vector3d

usage

// 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)

documentation

At the moment, documentation is available in the source code.

1.0.5

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago