Skip to content

Latest commit

 

History

History
23 lines (19 loc) · 1.07 KB

README_HEADER.md

File metadata and controls

23 lines (19 loc) · 1.07 KB

Build Status Coverage Status

Usage

Install with npm.

npm install @aliser/vector2

Import as a module.

import { Vector2, RAD2DEG, DEG2RAD } from '@aliser/vector2';

Enjoy!

Below you can find the docs for all of this.

Note: the static and the instance methods are mixed. Sorry for that.

TODO

  • custom interpolation functions for the static lerp - slide with ease!
  • maybe some static damping function - it'll make the target vector experience some kind of repulsion (the magnitude of which is controller by some specified function) on approaching the end point.
  • getters for directions - up, down, right, west, east, forward, backward, sideways, the 5- and 11- dimensions and other.
  • implement the stuff that other libs like this one are providing: reflect, normal, moveTowards.