Skip to content

Commit

Permalink
2.1.1 - Make random number from 0 - 100
Browse files Browse the repository at this point in the history
  • Loading branch information
dkim19375 committed Jan 17, 2021
1 parent e8160cf commit 06b5767
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ shadowJar {
}

group 'me.dkim19375'
version '2.1.0'
version '2.1.1'

repositories {
mavenCentral()
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/me/dkim19375/dkim19375core/NumberUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ public static double getPercentageDouble(double lower, double max) {
}

public static boolean percentChance(float chance) {
return Math.random() <= chance;
return Math.random() * 100 <= chance;
}

public static boolean percentChance(int chance) {
return Math.random() <= chance;
return Math.random() * 100 <= chance;
}
}

0 comments on commit 06b5767

Please sign in to comment.