mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-24 17:22:55 +01:00
Fixed fast floor in NoiseGenerator
By: Dinnerbone <dinnerbone@dinnerbone.com>
This commit is contained in:
parent
67a52cca79
commit
2b6b449dbc
1 changed files with 1 additions and 1 deletions
|
@ -17,7 +17,7 @@ public abstract class NoiseGenerator {
|
||||||
* @return Floored value
|
* @return Floored value
|
||||||
*/
|
*/
|
||||||
public static int floor(double x) {
|
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) {
|
protected static double fade(double x) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue