Package org.bukkit.util
Class NumberConversions
- java.lang.Object
-
- org.bukkit.util.NumberConversions
-
public final class NumberConversions extends Object
Utils for casting number types to other number types
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static int
ceil(double num)
static void
checkFinite(double d, String message)
static void
checkFinite(float d, String message)
static int
floor(double num)
static boolean
isFinite(double d)
static boolean
isFinite(float f)
static int
round(double num)
static double
square(double num)
static byte
toByte(Object object)
static double
toDouble(Object object)
static float
toFloat(Object object)
static int
toInt(Object object)
static long
toLong(Object object)
static short
toShort(Object object)
-
-
-
Method Detail
-
floor
public static int floor(double num)
-
ceil
public static int ceil(double num)
-
round
public static int round(double num)
-
square
public static double square(double num)
-
toInt
public static int toInt(@Nullable Object object)
-
toFloat
public static float toFloat(@Nullable Object object)
-
toDouble
public static double toDouble(@Nullable Object object)
-
toLong
public static long toLong(@Nullable Object object)
-
toShort
public static short toShort(@Nullable Object object)
-
toByte
public static byte toByte(@Nullable Object object)
-
isFinite
public static boolean isFinite(double d)
-
isFinite
public static boolean isFinite(float f)
-
checkFinite
public static void checkFinite(double d, @NotNull String message)
-
checkFinite
public static void checkFinite(float d, @NotNull String message)
-
-