1.4.0 • Published 1 year ago

dotspace v1.4.0

Weekly downloads
1
License
MIT
Repository
github
Last release
1 year ago

→ dotspace

Do vector math in JavaScript.

Install

This package is ESM only. Its contents must be imported.

npm:

npm install dotspace

yarn:

yarn add dotspace

Usage

When using dotspace all vectors are represented by arrays of numbers:

const newVector = add([1, 0], [0, 1]); // => [1, 1]

This package exports:

  • equals
  • add
  • subtract
  • dotProduct
  • crossProduct
  • magnitude
  • resize
  • normalize
  • multiplyByComponents
  • multiplyByScalar
  • invert

There are no default exports.

1.4.0

1 year ago

1.2.0

3 years ago

1.1.0

3 years ago

1.0.0

3 years ago