From 8425da2e5516e9370613976a7843f7c88bfd3a4d Mon Sep 17 00:00:00 2001 From: Lorenz Lo Sauer Date: Tue, 16 Apr 2013 23:22:54 +0300 Subject: [PATCH] +formula fix: theta in fn:toAngles --- src/vector.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vector.js b/src/vector.js index a41113a..aa9e09f 100644 --- a/src/vector.js +++ b/src/vector.js @@ -57,7 +57,7 @@ Vector.prototype = { }, toAngles: function() { return { - theta: Math.atan2(this.z, this.x), + theta: Math.atan2(this.y, this.x), phi: Math.asin(this.y / this.length()) }; },