org.statcato.calculator
Class MathFunction

java.lang.Object
  extended by org.statcato.calculator.MathFunction

public class MathFunction
extends java.lang.Object

A mathematical function object defined by a type.

Since:
1.0
Version:
%I%, %G%
Author:
Margaret Yau
See Also:
MathFunctions

Constructor Summary
MathFunction(int type, boolean isRadian)
           
 
Method Summary
 CompUnit call(CompUnit c)
          Performs a function call on the given computation unit.
 double call1(double argument)
          Performs a function call on the given double value.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MathFunction

public MathFunction(int type,
                    boolean isRadian)
Method Detail

call

public CompUnit call(CompUnit c)
Performs a function call on the given computation unit.

Parameters:
c - computational unit
Returns:
the result of calling the function on the argument

call1

public double call1(double argument)
Performs a function call on the given double value.

Parameters:
argument - double value
Returns:
the result of calling the function on the given double value