maslab.util
Class MathUtil

java.lang.Object
  extended by maslab.util.MathUtil

public class MathUtil
extends java.lang.Object

Useful math utilities.


Constructor Summary
MathUtil()
           
 
Method Summary
static boolean doubleEquals(double a, double b)
          Returns true if the two doubles are within a small epsilon of each other.
static void main(java.lang.String[] args)
           
static double mod2pi(double v)
          Ensure that v is [-PI, PI]
static double mod2pi(double ref, double v)
          Returns a value of v wrapped such that ref and v differ by no more +/-PI
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MathUtil

public MathUtil()
Method Detail

mod2pi

public static double mod2pi(double v)
Ensure that v is [-PI, PI]


mod2pi

public static double mod2pi(double ref,
                            double v)
Returns a value of v wrapped such that ref and v differ by no more +/-PI


doubleEquals

public static boolean doubleEquals(double a,
                                   double b)
Returns true if the two doubles are within a small epsilon of each other.


main

public static void main(java.lang.String[] args)