Skip to content

Commit e37cc46

Browse files
author
Lauren McCarthy
committed
fixes #1377
1 parent 6eaa75c commit e37cc46

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/core/p5.Renderer2D.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1011,15 +1011,17 @@ p5.Renderer2D.prototype.scale = function(x,y) {
10111011

10121012
p5.Renderer2D.prototype.shearX = function(angle) {
10131013
if (this._pInst._angleMode === constants.DEGREES) {
1014-
angle = this._pInst.radians(angle);
1014+
// undoing here, because it gets redone in tan()
1015+
angle = this._pInst.degrees(angle);
10151016
}
10161017
this.drawingContext.transform(1, 0, this._pInst.tan(angle), 1, 0, 0);
10171018
return this;
10181019
};
10191020

10201021
p5.Renderer2D.prototype.shearY = function(angle) {
10211022
if (this._pInst._angleMode === constants.DEGREES) {
1022-
angle = this._pInst.radians(angle);
1023+
// undoing here, because it gets redone in tan()
1024+
angle = this._pInst.degrees(angle);
10231025
}
10241026
this.drawingContext.transform(1, this._pInst.tan(angle), 0, 1, 0, 0);
10251027
return this;

0 commit comments

Comments
 (0)