2d vector math javascript / coffeescript class