com.generationjava.math
Class Interval

java.lang.Object
  extended bycom.generationjava.math.Interval

public class Interval
extends Object

A continuous range between two doubles.


Constructor Summary
Interval(double lower, double upper)
          Create an Interval between two doubles.
 
Method Summary
 Interval add(Interval i)
          Add this Interval to another one.
 Interval div(Interval i)
          Divide this interval by another.
 boolean equals(Object obj)
           
 int hashCode()
           
static Interval makeIntervalCenterPercentage(double center, float percentage)
          Make an Interval with the specified center and the specified percentage difference from the center.
static Interval makeIntervalCenterWidth(double center, double difference)
          Make an Interval with the specified center and difference from the center.
 Interval mul(Interval i)
          Multiple this Interval by another one.
 Interval sub(Interval i)
          Subtract an Interval from this Interval.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Interval

public Interval(double lower,
                double upper)
Create an Interval between two doubles.

Method Detail

makeIntervalCenterWidth

public static Interval makeIntervalCenterWidth(double center,
                                               double difference)
Make an Interval with the specified center and difference from the center.


makeIntervalCenterPercentage

public static Interval makeIntervalCenterPercentage(double center,
                                                    float percentage)
Make an Interval with the specified center and the specified percentage difference from the center.


add

public Interval add(Interval i)
Add this Interval to another one.


mul

public Interval mul(Interval i)
Multiple this Interval by another one.


div

public Interval div(Interval i)
Divide this interval by another.


sub

public Interval sub(Interval i)
Subtract an Interval from this Interval.


toString

public String toString()

equals

public boolean equals(Object obj)

hashCode

public int hashCode()


Copyright © 2000-2005 OSJava. All Rights Reserved.