summaryrefslogtreecommitdiffstats
path: root/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'src/main')
-rw-r--r--src/main/java/org/bukkit/util/noise/NoiseGenerator.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/main/java/org/bukkit/util/noise/NoiseGenerator.java b/src/main/java/org/bukkit/util/noise/NoiseGenerator.java
index dd5b0b46..10a46b00 100644
--- a/src/main/java/org/bukkit/util/noise/NoiseGenerator.java
+++ b/src/main/java/org/bukkit/util/noise/NoiseGenerator.java
@@ -17,7 +17,7 @@ public abstract class NoiseGenerator {
* @return Floored value
*/
public static int floor(double x) {
- return (int)Math.floor(x);
+ return x >= 0 ? (int) x : (int) x - 1;
}
protected static double fade(double x) {