@@ -73,7 +73,7 @@ public final class PeasyGradients {
73
73
private static final double HALF_PI = (0.5 * Math .PI );
74
74
private static final double INV_TWO_PI = 1 / TWO_PI ;
75
75
private static final double THREE_QRTR_PI = (0.75 * Math .PI );
76
- private static final double DEFAULT_DITHER = 0.015 ;
76
+ private static final double DEFAULT_DITHER = 0.01 ;
77
77
78
78
private static final ExecutorService THREAD_POOL ;
79
79
@@ -523,7 +523,7 @@ public void spiralGradient(Gradient gradient, PVector centerPoint, double angle,
523
523
curveCount *= TWO_PI ;
524
524
525
525
curviness = 1f / curviness ;
526
- curviness *= 0.5 ; // curviness of 1 == exponenent of 0.5
526
+ curviness *= 0.5 ; // curviness of 1 == exponent of 0.5
527
527
528
528
final double renderMidpointX = (centerPoint .x / gradientPG .width ) * renderWidth ;
529
529
final double renderMidpointY = (centerPoint .y / gradientPG .height ) * renderHeight ;
@@ -1117,16 +1117,16 @@ public Boolean call() throws Exception {
1117
1117
1118
1118
double t ;
1119
1119
double spiralOffset = 0 ;
1120
-
1121
1120
for (int y = rowOffset ; y < rowOffset + rows ; y ++) {
1122
1121
double rise = renderMidpointY - y ;
1123
1122
final double riseSquared = rise * rise ;
1124
1123
for (int x = 0 ; x < gradientPG .width ; x ++) { // FULL WIDTH
1125
1124
1126
1125
double run = renderMidpointX - x ;
1127
1126
t = Functions .fastAtan2b (rise , run ) - angle ; // -PI...PI
1128
- spiralOffset = curveCount * curviness == 0.5f ? Math .sqrt ((riseSquared + run * run ) * curveDenominator )
1127
+ spiralOffset = curviness == 0.5f ? Math .sqrt ((riseSquared + run * run ) * curveDenominator )
1129
1128
: FastPow .fastPow ((riseSquared + run * run ) * curveDenominator , curviness );
1129
+ spiralOffset *=curveCount ;
1130
1130
t += spiralOffset ;
1131
1131
1132
1132
t *= INV_TWO_PI ; // normalise
0 commit comments