1.1.4 • Published 4 years ago

simple-vectors v1.1.4

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

simple-vectors

A library that contains some simple functions for working with vectors.

Usage

yarn add simple-vectors

const vector = createVector(3, 5);
const vector2 = createVector('5,10');

const x = vector.x; // 3
const y = vector.y; // 3

const newPosition = createPosition(1, 2); // {x: 1, y: 2}

const vector3 = vector.add(vector2); // {x: 8, y: 15}

const area = vector.getArea(); // 15

const isEqual = vector.isEqual(vector2); // false

const key = vector.toString(); // '3-5'
1.1.4

4 years ago

1.1.3

5 years ago

1.1.2

5 years ago

1.1.1

5 years ago

1.1.0

5 years ago

1.0.10

5 years ago

1.0.9

5 years ago

1.0.8

5 years ago

1.0.7

5 years ago

1.0.6

5 years ago

1.0.5

5 years ago

1.0.4

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago