com.ijchart.xychart.util
Class MathUtil

java.lang.Object
  extended by com.ijchart.xychart.util.MathUtil

public abstract class MathUtil
extends java.lang.Object

Title: IJChart

Description: a chart library for the Java(tm) platform.

Nice static helpers for working with Math

Copyright: Copyright (c) 2013

Company:

Version:
1.0
Author:
zhang feng min,shanghai china. Contract me by email.

Constructor Summary
MathUtil()
           
 
Method Summary
static int sign(double val)
           The Signum function.
static int sign(double v1, double v2)
           The Signum function.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MathUtil

public MathUtil()
Method Detail

sign

public static int sign(double v1,
                       double v2)
The Signum function.

Parameters:
v1 - double The first value.
v2 - double The second value.
Returns:
int Back -1 if v1v2 return 1, v1=v2 return 0.

sign

public static int sign(double val)
The Signum function.

Parameters:
val - double The value.
Returns:
int Returns the signum of val,greater than 0 returns 1, -1 less than 0, equal to 0 returns 0.