Skip to content

Commit 71d91e4

Browse files
authored
Merge pull request #31 from meteorOSS/master
fix: single char error
2 parents ab60940 + 89608e0 commit 71d91e4

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

src/main/java/com/iridium/iridiumcolorapi/IridiumColorAPI.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -232,6 +232,7 @@ private static ChatColor[] createRainbow(int step, float saturation) {
232232
*/
233233
@Nonnull
234234
private static ChatColor[] createGradient(@Nonnull Color start, @Nonnull Color end, int step) {
235+
step = Math.max(step,2);
235236
ChatColor[] colors = new ChatColor[step];
236237
int stepR = Math.abs(start.getRed() - end.getRed()) / (step - 1);
237238
int stepG = Math.abs(start.getGreen() - end.getGreen()) / (step - 1);

0 commit comments

Comments
 (0)