maxkueng / victor

A JavaScript 2D vector class with methods for common vector operations

Home Page:http://victorjs.org/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Rotations are not totally accurate (due to floating point math, require rounding)

dan-tilley opened this issue · comments

// As per documentation, the following
var vec = new Victor(100, 0);
vec.rotateBy(Math.PI / 2);
vec.toString();
// => "x:6.123233995736766e-15, y:100"

x should be zero