evanw / lightgl.js

A lightweight WebGL library
MIT License
1.52k stars 146 forks source link

vector.js same phi for two different vectors #18

Open luckylooke opened 10 years ago

luckylooke commented 10 years ago

Copied from console: a=new Vector(1,-1) Vector {x: 1, y: -1, z: 0, negative: function, add: function…} a.toAngles().phi -0.7853981633974482 b=new Vector(-1,-1) Vector {x: -1, y: -1, z: 0, negative: function, add: function…} b.toAngles().phi -0.7853981633974482

Equal case is for a=new Vector(-1,1) and a=new Vector(1,1)

bowbahdoe commented 6 years ago

Can you show mathematically that this should not be the case?