![]() |
Crossfire JXClient, Trunk
|
Utility class for mathematical functions. More...
Static Public Member Functions | |
static int | div (final int numerator, final int denominator) |
Calculates \floor(. More... | |
static int | divRound (final int numerator, final int denominator) |
Returns the quotient of two values, rounded to the nearest integer. More... | |
static int | divRoundUp (final int numerator, final int denominator) |
Returns the quotient of two values, rounded up to the nearest integer. More... | |
static int | mod (final int numerator, final int denominator) |
Calculates the remainder of. More... | |
Private Member Functions | |
MathUtils () | |
Private constructor to prevent instantiation. More... | |
Utility class for mathematical functions.
Definition at line 29 of file MathUtils.java.
|
private |
Private constructor to prevent instantiation.
Definition at line 34 of file MathUtils.java.
|
static |
Calculates \floor(.
).
numerator | the numerator |
denominator | the denominator |
Definition at line 43 of file MathUtils.java.
|
static |
Returns the quotient of two values, rounded to the nearest integer.
numerator | the numerator |
denominator | the denominator |
Definition at line 80 of file MathUtils.java.
Referenced by com.realtime.crossfire.jxclient.gui.item.ItemPainter.paint().
|
static |
Returns the quotient of two values, rounded up to the nearest integer.
numerator | the numerator |
denominator | the denominator |
Definition at line 67 of file MathUtils.java.
Referenced by com.realtime.crossfire.jxclient.gui.map.GUIMap.getPreferredMapHeight(), com.realtime.crossfire.jxclient.gui.map.GUIMap.getPreferredMapWidth(), and com.realtime.crossfire.jxclient.gui.map.AbstractGUIMap.setMapSize().
|
static |
Calculates the remainder of.
.
numerator | the numerator |
denominator | the denominator |
Definition at line 56 of file MathUtils.java.
Referenced by com.realtime.crossfire.jxclient.gui.map.AbstractGUIMap.setMapSize().