Skip to content

Commit

Permalink
Fix aliasing bug in Matrix3x2.scaleAround()
Browse files Browse the repository at this point in the history
  • Loading branch information
httpdigest committed Nov 12, 2020
1 parent 407eabd commit 424d180
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/org/joml/Matrix3x2d.java
Original file line number Diff line number Diff line change
Expand Up @@ -1462,8 +1462,8 @@ public Matrix3x2d scaleAround(double sx, double sy, double ox, double oy, Matrix
dest.m01 = m01 * sx;
dest.m10 = m10 * sy;
dest.m11 = m11 * sy;
dest.m20 = -m00 * ox - m10 * oy + nm20;
dest.m21 = -m01 * ox - m11 * oy + nm21;
dest.m20 = dest.m00 * -ox + dest.m10 * -oy + nm20;
dest.m21 = dest.m01 * -ox + dest.m11 * -oy + nm21;
return dest;
}

Expand Down
4 changes: 2 additions & 2 deletions src/org/joml/Matrix3x2f.java
Original file line number Diff line number Diff line change
Expand Up @@ -1400,8 +1400,8 @@ public Matrix3x2f scaleAround(float sx, float sy, float ox, float oy, Matrix3x2f
dest.m01 = m01 * sx;
dest.m10 = m10 * sy;
dest.m11 = m11 * sy;
dest.m20 = -m00 * ox - m10 * oy + nm20;
dest.m21 = -m01 * ox - m11 * oy + nm21;
dest.m20 = dest.m00 * -ox + dest.m10 * -oy + nm20;
dest.m21 = dest.m01 * -ox + dest.m11 * -oy + nm21;
return dest;
}

Expand Down

0 comments on commit 424d180

Please sign in to comment.