Skip to content

Commit

Permalink
Update gilbertCurve.js
Browse files Browse the repository at this point in the history
  • Loading branch information
mcychan authored Aug 28, 2024
1 parent 3bf359f commit a907ff9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/gilbertCurve.js
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ Copyright (c) 2022 - 2023 Miller Cy Chan
var hasAlpha = this.opts.weight < 0;
this.opts.weight = Math.abs(this.opts.weight);
margin = this.opts.weight < .0025 ? 12 : 6;
sortedByYDiff = this.opts.palette.length >= 128 && (hasAlpha ? this.opts.weight < .18 : this.opts.weight >= .04);
sortedByYDiff = this.opts.palette.length >= 128 && (hasAlpha ? this.opts.weight < .18 : this.opts.weight >= .052);

DITHER_MAX = this.opts.weight < .01 ? (this.opts.weight > .0025) ? 25 : 16 : 9;
var edge = hasAlpha ? 1 : Math.exp(this.opts.weight) - .25;
Expand Down

0 comments on commit a907ff9

Please sign in to comment.