APIdia Launch Partner
Top Description Fields Constructors Methods
com.sun.marlin

public final Class FloatMath

extends Object
implements MarlinConst
Class Inheritance
All Implemented Interfaces
com.sun.marlin.MarlinConst

Faster Math ceil / floor routines derived from StrictMath

Field Summary

Modifier and TypeField and Description
pack-priv static final boolean
pack-priv static final boolean

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static int

Returns:

the largest (closest to positive infinity) integer value that less than or equal to the argument and is equal to a mathematical integer.
ceil_int
(final double
a value.
a
)

Faster alternative to ceil(double) optimized for the integer domain and supporting NaN and +/-Infinity.

public static int

Returns:

the largest (closest to positive infinity) floating-point value that less than or equal to the argument and is equal to a mathematical integer.
floor_int
(final double
a value.
a
)

Faster alternative to floor(double) optimized for the integer domain and supporting NaN and +/-Infinity.

public static int
max(final int a, final int b)

public static int
min(final int a, final int b)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

CHECK_NANback to summary
pack-priv static final boolean CHECK_NAN
CHECK_OVERFLOWback to summary
pack-priv static final boolean CHECK_OVERFLOW

Constructor Detail

FloatMathback to summary
private FloatMath()

Method Detail

ceil_intback to summary
public static int ceil_int(final double a)

Faster alternative to ceil(double) optimized for the integer domain and supporting NaN and +/-Infinity.

Parameters
a:double

a value.

Returns:int

the largest (closest to positive infinity) integer value that less than or equal to the argument and is equal to a mathematical integer.

floor_intback to summary
public static int floor_int(final double a)

Faster alternative to floor(double) optimized for the integer domain and supporting NaN and +/-Infinity.

Parameters
a:double

a value.

Returns:int

the largest (closest to positive infinity) floating-point value that less than or equal to the argument and is equal to a mathematical integer.

maxback to summary
public static int max(final int a, final int b)
minback to summary
public static int min(final int a, final int b)