mirror of
https://github.com/Eaglercraft-Archive/Eaglercraftx-1.8.8-src.git
synced 2025-06-28 02:48:14 -05:00
18 lines
275 B
Java
18 lines
275 B
Java
package net.optifine.util;
|
|
|
|
public class NumUtils {
|
|
public static float limit(float val, float min, float max) {
|
|
return val < min ? min : (val > max ? max : val);
|
|
}
|
|
|
|
public static int mod(int x, int y) {
|
|
int i = x % y;
|
|
|
|
if (i < 0) {
|
|
i += y;
|
|
}
|
|
|
|
return i;
|
|
}
|
|
}
|