Skip to content

Commit

Permalink
Merge pull request #2468 from Spongman/patch-9
Browse files Browse the repository at this point in the history
fix matrix rotation

cleans up an erroneous condition where the _a was left undefined when angleMode is set to RADIANS.
  • Loading branch information
kjhollen authored Dec 30, 2017
2 parents e457148 + 5614cc4 commit 5501304
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/webgl/p5.Matrix.js
Original file line number Diff line number Diff line change
Expand Up @@ -514,10 +514,8 @@ p5.Matrix.prototype.scale = function() {
p5.Matrix.prototype.rotate = function(a, axis) {
var x, y, z, _a, len;

if (this.p5) {
if (this.p5._angleMode === constants.DEGREES) {
_a = polarGeometry.degreesToRadians(a);
}
if (this.p5 && this.p5._angleMode === constants.DEGREES) {
_a = polarGeometry.degreesToRadians(a);
} else {
_a = a;
}
Expand Down

0 comments on commit 5501304

Please sign in to comment.