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.

处理数学运算的工具类

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)
          符号函数.
static int sign(double v1, double v2)
          符号函数.
 
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)
符号函数.

Parameters:
v1 - double 第一个值.
v2 - double 第二个值.
Returns:
int 如果v1v2返回1,v1=v2返回0.

sign

public static int sign(double val)
符号函数.

Parameters:
val - double 数字值.
Returns:
int 取数字val的符号,大于0返回1,小于0返回-1,等于0返回0.