X-Git-Url: http://git.scottworley.com/nt3d/blobdiff_plain/2f26ede4efa95cc756a2b3240c2a9e29f0f48486..c92a9d3f963401b999f661dde190a739ebbeafde:/nt3d.js diff --git a/nt3d.js b/nt3d.js index c69c185..fd57824 100644 --- a/nt3d.js +++ b/nt3d.js @@ -211,7 +211,7 @@ nt3d = { }, project: function(a, b) { // Project b onto a var a_magnitude = this.magnitude(a); - return this.scale(a, this.dot(a, b) / a_magnitude * a_magnitude); + return this.scale(a, this.dot(a, b) / (a_magnitude * a_magnitude)); }, project_to_orthogonal: function(a, b) { // The nearest thing to b that is orthogonal to a