|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.objectweb.petals.tools.webadmin.util.MathTools
public final class MathTools
some mathematics usefull methods...
Field Summary | |
---|---|
static int |
HUNDRED
|
static int |
TEN
|
static int |
THOUSAND
|
Method Summary | |
---|---|
static long |
elementMax(java.lang.Long[] numbers)
Returns the maximum element of an array of long numbers |
static long |
elementMin(java.lang.Long[] numbers)
Returns the minimum element of an array of long numbers |
static double |
nbPerSec(long time,
int nbElem)
Returns a number of elements per second |
static double |
percent(int value,
int total)
Returns the value as a percentage of the total |
static double |
round(double number,
int precision)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int HUNDRED
public static final int TEN
public static final int THOUSAND
Method Detail |
---|
public static long elementMax(java.lang.Long[] numbers)
numbers
- array of long numbers
public static long elementMin(java.lang.Long[] numbers)
numbers
- array of long numbers
public static double nbPerSec(long time, int nbElem)
time
- time elapsednbElem
- total number of elements
public static double percent(int value, int total)
value
- number to transformtotal
- reference number
public static double round(double number, int precision)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |