程序包 org.bukkit.util

# 类 NumberConversions

java.lang.Object
org.bukkit.util.NumberConversions

public final class NumberConversions extends Object
数字类型转换工具类。

- ## 方法概要

  修饰符和类型
  方法
  说明
  `static int`
  `ceil(double num)`
  `static void`
  `checkFinite(double d, @NotNull String message)`
  `static void`
  `checkFinite(float d, @NotNull 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(@Nullable Object object)`
  `static double`
  `toDouble(@Nullable Object object)`
  `static float`
  `toFloat(@Nullable Object object)`
  `static int`
  `toInt(@Nullable Object object)`
  `static long`
  `toLong(@Nullable Object object)`
  `static short`
  `toShort(@Nullable Object object)`

  ### 从类继承的方法 java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## 方法详细资料

  - ### 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 @Nullable Object object)

  - ### toFloat

    public static float toFloat(@Nullable @Nullable Object object)

  - ### toDouble

    public static double toDouble(@Nullable @Nullable Object object)

  - ### toLong

    public static long toLong(@Nullable @Nullable Object object)

  - ### toShort

    public static short toShort(@Nullable @Nullable Object object)

  - ### toByte

    public static byte toByte(@Nullable @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 @NotNull String message)

  - ### checkFinite

    public static void checkFinite(float d, @NotNull @NotNull String message)