Last active
June 25, 2017 16:53
-
-
Save behreajj/80597cc3fe83cac5203b305ede4eb99d to your computer and use it in GitHub Desktop.
Color Gradients 2-4
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void addColorStop(ColorStop cs) { | |
ColorStop other; | |
for (int i = 0, sz = colors.size(); i < sz; ++i) { | |
other = colors.get(i); | |
if (cs.approximates(other, Gradient.TOLERANCE)) { | |
println(cs, "percentage is too close to", other); | |
return; | |
} | |
} | |
colors.add(cs); | |
java.util.Collections.sort(colors); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment