|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.webmacro.servlet.MathTool
A ContextTool for performing the more useful methods from
java.lang.Math
.
Field Summary | |
static double |
PI
the value of PI, as defined by java.lang.Math.PI |
Constructor Summary | |
MathTool()
default contsructor. |
|
MathTool(Context context)
public constructor. |
Method Summary | |
static double |
abs(double a)
|
static float |
abs(float a)
|
static int |
abs(int a)
|
static long |
abs(long a)
|
void |
destroy(java.lang.Object o)
Perform necessary cleanup work |
static double |
divide(java.lang.Number a,
java.lang.Number b)
Converts args to doubles and divides the first by the second. |
static MathTool |
getInstance()
|
java.lang.Object |
init(Context context)
Tool initialization method. |
static double |
max(double a,
double b)
|
static float |
max(float a,
float b)
|
static int |
max(int a,
int b)
|
static long |
max(long a,
long b)
|
static double |
min(double a,
double b)
|
static float |
min(float a,
float b)
|
static int |
min(int a,
int b)
|
static long |
min(long a,
long b)
|
static int |
mod(int a,
int b)
|
static double |
multiply(java.lang.Number a,
java.lang.Number b)
Converts args to doubles and multiplies them together. |
static int |
pow(int base,
int power)
|
static long |
pow(long base,
long power)
|
static int |
random(int start,
int end)
Creates a pseudo-random Integer between start
and end , inclusive |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final double PI
java.lang.Math.PI
Constructor Detail |
public MathTool()
public MathTool(Context context)
Method Detail |
public static final MathTool getInstance()
public static final int min(int a, int b)
public static final long min(long a, long b)
public static final float min(float a, float b)
public static final double min(double a, double b)
public static final int max(int a, int b)
public static final long max(long a, long b)
public static final float max(float a, float b)
public static final double max(double a, double b)
public static final int random(int start, int end)
start
and end
, inclusive
public static final int pow(int base, int power)
base
raised to the specified power
public static final long pow(long base, long power)
public static final int abs(int a)
public static final long abs(long a)
public static final float abs(float a)
public static final double abs(double a)
public static final int mod(int a, int b)
a
modulo b
public static final double multiply(java.lang.Number a, java.lang.Number b)
a * b
public static final double divide(java.lang.Number a, java.lang.Number b)
a / b
public java.lang.Object init(Context context) throws PropertyException
context
parameter is ignored.
init
in interface ContextTool
PropertyException
public void destroy(java.lang.Object o)
destroy
in interface ContextTool
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |