edu.stanford.hci.r3.util
Class MathUtils

java.lang.Object
  extended by edu.stanford.hci.r3.util.MathUtils

public class MathUtils
extends java.lang.Object

Useful math functions. :)

This software is distributed under the BSD License.


Constructor Summary
MathUtils()
           
 
Method Summary
static double average(double... vals)
          If you think your values will overflow this operation, then roll your own
static double distance(double x1, double y1, double x2, double y2)
           
static int rint(double val)
           
static double standardDeviation(double... vals)
          Check out how dispersed a set of data are...
static double standardDeviation(java.lang.Double... vals)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MathUtils

public MathUtils()
Method Detail

average

public static double average(double... vals)
If you think your values will overflow this operation, then roll your own

Parameters:
vals -
Returns:

distance

public static double distance(double x1,
                              double y1,
                              double x2,
                              double y2)
Parameters:
x1 -
y1 -
x2 -
y2 -
Returns:

rint

public static int rint(double val)
Parameters:
val -
Returns:

standardDeviation

public static double standardDeviation(double... vals)
Check out how dispersed a set of data are... Returns the standard deviation.

Parameters:
vals -
Returns:

standardDeviation

public static double standardDeviation(java.lang.Double... vals)
Parameters:
vals -
Returns:

Copyright 2006 Stanford University