Skip to content
This repository has been archived by the owner on Aug 10, 2024. It is now read-only.

Commit

Permalink
Correct angle calculation
Browse files Browse the repository at this point in the history
  • Loading branch information
renatocf committed May 12, 2015
1 parent a3d2673 commit 8a9efc8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion App/trackball.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ Trackball.prototype.rotation = function(x1, y1, x2, y2, mORq) {
var V2 = normalize(vec3(x2, y2, z2));

var N = cross(V1, V2);
var theta = 10 * dot(V1, V2);
var theta = 10 * Math.acos(dot(V1, V2));

if (N[0] == 0 && N[1] == 0 && N[2] == 0) theta = 0;

Expand Down

0 comments on commit 8a9efc8

Please sign in to comment.