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.
- 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.