Skip to content

Commit

Permalink
fix #8
Browse files Browse the repository at this point in the history
  • Loading branch information
micycle1 committed Feb 2, 2024
1 parent 537cd69 commit 1f6b773
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/micycle/peasygradients/PeasyGradients.java
Original file line number Diff line number Diff line change
Expand Up @@ -947,7 +947,7 @@ public Boolean call() {
opXod += odY * scaleY;
float xOff = 0; // set partition x offset to correct amount
for (int x = 0; x < renderWidth; x++) {
float step = (opXod + xOff - rowOffset) * odSqInverse; // get position of point on 1D gradient and normalise
float step = (opXod + xOff) * odSqInverse; // get position of point on 1D gradient and normalise
step = (step < 0) ? 0 : (step > 1 ? 1 : step); // clamp between 0...1
int stepInt = (int) (step * gradientCacheSize);
gradientPG.pixels[pixel++] = gradientCache[stepInt];
Expand Down

0 comments on commit 1f6b773

Please sign in to comment.