java.lang.Object
io.github.palexdev.virtualizedfx.utils.NumberUtils
-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明static doubleclamp(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 intclamp(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 doubleformatTo(double value, int decimalPrecision) Formats the given double value to have the given number of decimal places.
-
构造器详细资料
-
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.
-