brf.j2me.dynaworks.util
Class Math

java.lang.Object
  |
  +--brf.j2me.dynaworks.util.Math

public class Math
extends java.lang.Object

The Math class provides static mathematical methods.

Version:
1.0
Author:
Bernd R. Fix

Constructor Summary
Math()
           
 
Method Summary
static int abs(int num)
          get the absolute value of a number.
static int max(int v1, int v2)
          get the larger value of two numbers.
static int min(int v1, int v2)
          get the smaller value of two numbers.
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Constructor Detail

Math

public Math()
Method Detail

min

public static int min(int v1,
                      int v2)
get the smaller value of two numbers.

Parameters:
v1 - int - first value
v2 - int - second value
Returns:
int - smaller value

max

public static int max(int v1,
                      int v2)
get the larger value of two numbers.

Parameters:
v1 - int - first value
v2 - int - second value
Returns:
int - larger value

abs

public static int abs(int num)
get the absolute value of a number.

Parameters:
num - int - number
Returns:
int - absolute value