Skip to content

Commit

Permalink
credit rotation function
Browse files Browse the repository at this point in the history
  • Loading branch information
brendankenny committed Oct 25, 2014
1 parent 7b07b1a commit 9fc2d19
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions test/common.js
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,8 @@ exports.createPlaneRotation = function(normal) {
}

// arbitrary normal, hopefully not too near nz = -1
// special case of vector-to-vector rotation matrix from Real-Time Rendering,
// Third Edition
var denom = 1 + nz;
var transform = [
nz + ny * ny / denom, -nx * ny / denom, -nx,
Expand Down

0 comments on commit 9fc2d19

Please sign in to comment.