Package org.eclipse.birt.core.script

# Class MathUtil

java.lang.Object
org.eclipse.birt.core.script.MathUtil

public class MathUtil extends Object

## Constructor Summary

Constructors
Constructor
Description
`MathUtil()`

## Method Summary

Modifier and Type
Method
Description
`static final Number`
`abs(Object number)`
`static final Number`
`add(Object obj1, Object obj2)`
add operation.
`static final int`
`compare(Object number1, Object number2)`
`static final int`
`compareTo0(Object number)`
`static final Number`
`divide(Object dividend, Object divisor)`
`static final Number`
`multiply(Object obj1, Object obj2)`
`static final Number`
`negate(Object number)`
`static final Object`
`safeDivide(Object dividend, Object divisor, Object ifZero)`
`static final Number`
`subtract(Object obj1, Object obj2)`
`static final Number`
`toNumber(Object obj1)`
add operation.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### MathUtil

public MathUtil()

## Method Details

### add

public static final Number add(Object obj1, Object obj2) throws BirtException
add operation.

Parameters:
  `obj1` -
  `obj2` -
Returns:
Throws:
  `BirtException`

### subtract

public static final Number subtract(Object obj1, Object obj2) throws BirtException

Parameters:
  `obj1` -
  `obj2` -
Returns:
Throws:
  `BirtException`

### multiply

public static final Number multiply(Object obj1, Object obj2) throws BirtException

Parameters:
  `obj1` -
  `obj2` -
Returns:
Throws:
  `BirtException`

### divide

public static final Number divide(Object dividend, Object divisor) throws BirtException

Parameters:
  `dividend` -
  `divisor` -
Returns:
Throws:
  `BirtException`

### safeDivide

public static final Object safeDivide(Object dividend, Object divisor, Object ifZero) throws BirtException

Parameters:
  `dividend` -
  `divisor` -
  `ifZero` -
Returns:
Throws:
  `BirtException`

### compareTo0

public static final int compareTo0(Object number) throws BirtException

Parameters:
  `number` -
Returns:
Throws:
  `BirtException`

### compare

public static final int compare(Object number1, Object number2) throws BirtException

Parameters:
  `number` -
Returns:
Throws:
  `BirtException`

### abs

public static final Number abs(Object number) throws BirtException

Parameters:
  `number` -
Returns:
Throws:
  `BirtException`

### negate

public static final Number negate(Object number) throws BirtException

Parameters:
  `number` -
Returns:
Throws:
  `BirtException`

### toNumber

public static final Number toNumber(Object obj1) throws BirtException
add operation.

Parameters:
  `obj1` -
  `obj2` -
Returns:
Throws:
  `BirtException`