Crossfire JXClient, Trunk
R20561
|
Utility class for mathematical functions. More...
Static Public Member Functions | |
static int | div (final int numerator, final int denominator) |
Calculates (. 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 28 of file MathUtils.java.
|
private |
Private constructor to prevent instantiation.
Definition at line 33 of file MathUtils.java.
|
static |
Calculates (.
).
numerator | the numerator |
denominator | the denominator |
Definition at line 42 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 79 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 66 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 55 of file MathUtils.java.
Referenced by com.realtime.crossfire.jxclient.gui.map.AbstractGUIMap.setMapSize().