0.4.3 • Published 2 years ago

vectored v0.4.3

Weekly downloads
4
License
MIT
Repository
github
Last release
2 years ago

vectored a JavaScript 2 and 3D vector math library banner

Vectored

A JavaScript 2 and 3D vector math library

Installation

Node.js

npm install vectored
const Vec = require('./vec.js');

let vector = new Vec(4, 2, 0);

In browser

Include the script inside the html

<!-- Link to file directly -->
<script src="./vec.js"></script>

<!-- or latest via url -->
<script src="https://cdn.jsdelivr.net/npm/vectored@latest/build/vec.min.js"></script>

<!-- or to a specific version-->
<script src="https://cdn.jsdelivr.net/npm/vectored@0.4/build/vec.min.js"></script>

<!-- you can use vec.js here -->
<script src="/"></script>

How to use

Creating a vector

let vec1 = new Vec(3, 4);

Adding vectors

let vec1 = new Vec(3, 5);
let vec2 = new Vec(2, 1);

vec1.add(vec2);
console.log(vec1);
// -> Vec {x: 5, y: 6, z: 0}

For all vector opperations and explenations see the full documentations

Documentation

link to documentation

License

Licensed by MIT

0.4.3

2 years ago

0.4.2

3 years ago

0.4.1

3 years ago

0.3.1

3 years ago

0.3.0

4 years ago

0.2.0

4 years ago

0.1.0

4 years ago