-
public final class NumberExtensionsKt
-
-
Field Summary
Fields Modifier and Type Field Description public final static FloatPI_RADprivate final static Integerhalfprivate final static Floathalfprivate final static Doublehalfprivate final static Floatdoubledprivate final static IntegerorZeroIntprivate final static FloatorZeroprivate final static IntegerorZeroprivate final static Floatroundprivate final static FloatpiRadprivate final static Floatfloorprivate final static Floatceilprivate final static Floatmedian
-
Method Summary
Modifier and Type Method Description final IntegergetHalf()final FloatgetHalf()final DoublegetHalf()final FloatgetDoubled()final IntegergetOrZeroInt()final FloatgetOrZero()final IntegergetOrZero()final FloatgetRound()final FloatgetPiRad()final FloatgetFloor()final FloatgetCeil()final FloatgetMedian()final static BooleanhasFlag(Integer $self, Integer flag)Whether this value contains the provided bit flag. final static BooleanhasAnyFlagOf(Integer $self, Integer flags)Whether this value contains any of the provided bit flags. final static FloatfirstNonNegativeOf(Float floats)The first non-negative value of the values provided, or nullif none of the values is non-negative.final static ClosedFloatingPointRange<Float>rangeWith(Float $self, Float other)Creates a range from this value to the provided value or from the provided value to this value, depending on which value is larger. -
-
Method Detail
-
getDoubled
final Float getDoubled()
-
getOrZeroInt
final Integer getOrZeroInt()
-
hasFlag
final static Boolean hasFlag(Integer $self, Integer flag)
Whether this value contains the provided bit flag.
-
hasAnyFlagOf
final static Boolean hasAnyFlagOf(Integer $self, Integer flags)
Whether this value contains any of the provided bit flags.
-
firstNonNegativeOf
final static Float firstNonNegativeOf(Float floats)
The first non-negative value of the values provided, or
nullif none of the values is non-negative.
-
rangeWith
final static ClosedFloatingPointRange<Float> rangeWith(Float $self, Float other)
Creates a range from this value to the provided value or from the provided value to this value, depending on which value is larger.
-
-
-
-