/2dgeometry

Primary LanguageJavaScript

2dgeometry

Some functions for 2d geometry.

Vector / Point

Example:

var position = new Point(0, 0);

var velocity = new Vector(0, 0);

var acceleration = new Vector(1, 0);

velocity = velocity.add(acceleration);

position = position.add(velocity);