类 NumberUtils

java.lang.Object
io.github.palexdev.virtualizedfx.utils.NumberUtils

public class NumberUtils extends Object
  • 构造器概要

    构造器
    构造器
    说明
     
  • 方法概要

    修饰符和类型
    方法
    说明
    static double
    clamp(double val, double min, double max)
    Limits the given value to the given min-max range by returning the nearest bound if it exceeds or val if it's in range.
    static int
    clamp(int val, int min, int max)
    Limits the given value to the given min-max range by returning the nearest bound if it exceeds or val if it's in range.
    static double
    formatTo(double value, int decimalPrecision)
    Formats the given double value to have the given number of decimal places.

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

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 构造器详细资料

    • NumberUtils

      public NumberUtils()
  • 方法详细资料

    • clamp

      public static double clamp(double val, double min, double max)
      Limits the given value to the given min-max range by returning the nearest bound if it exceeds or val if it's in range.
    • clamp

      public static int clamp(int val, int min, int max)
      Limits the given value to the given min-max range by returning the nearest bound if it exceeds or val if it's in range.
    • formatTo

      public static double formatTo(double value, int decimalPrecision)
      Formats the given double value to have the given number of decimal places.