## de.grogra.vecmath Class Range

```java.lang.Object
de.grogra.vecmath.Range
```

`public class Rangeextends java.lang.Object`

This class implements interval arithmetic. Each range is an interval [a,b] with a <= b. Some operations for interval arithmetic are implemented. In general those operations expect an additional parameter `out` to store the result. For some information on interval arithmetic read: T. Hickey, Q. Ju, and M. H. Van Emden. 2001. Interval arithmetic: From principles to implementation. J. ACM 48, 5 (September 2001), 1038-1068. DOI=10.1145/502102.502106 http://doi.acm.org/10.1145/502102.502106

Author:
Reinhard Hemmerling

Field Summary
` double` `a`

` double` `b`

Constructor Summary
`Range()`

`Range(double d)`

```Range(double min, double max)```

`Range(Range r)`

Method Summary
`static Range` ```abs(Range out, Range x)```

`static Range` ```acos(Range out, Range x)```

`static Range` ```add(Range out, Range x, Range y)```

`static Range` ```asin(Range out, Range x)```

`static Range` ```atan(Range out, Range x)```

`static Range` ```atan2(Range out, Range y, Range x)```

` boolean` `contains(double x)`

` boolean` `contains(Range x)`
Returns true if the supplied Range is fully contained within this Range.
`static Range` ```cos(Range out, Range x)```

`static Range` ```div(Range out, Range x, Range y)```

`static Range` ```mul(Range out, Range x, Range y)```

`static Range` ```pow(Range out, Range x, double e)```

` void` `set(double d)`

` void` ```set(double min, double max)```

` void` `set(Range r)`

`static Range` ```sin(Range out, Range x)```

`static Range` ```sqr(Range out, Range x)```

`static Range` ```sqrt(Range out, Range x)```

`static Range` ```sub(Range out, Range x, Range y)```

`static Range` ```tan(Range out, Range x)```

` java.lang.String` `toString()`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Field Detail

### a

`public double a`

### b

`public double b`
Constructor Detail

### Range

`public Range()`

### Range

`public Range(double d)`

### Range

```public Range(double min,
double max)```

### Range

`public Range(Range r)`
Method Detail

### abs

```public static final Range abs(Range out,
Range x)```

### acos

```public static final Range acos(Range out,
Range x)```

```public static final Range add(Range out,
Range x,
Range y)```

### asin

```public static final Range asin(Range out,
Range x)```

### atan

```public static final Range atan(Range out,
Range x)```

### atan2

```public static final Range atan2(Range out,
Range y,
Range x)```

### contains

`public boolean contains(double x)`

### contains

`public boolean contains(Range x)`
Returns true if the supplied Range is fully contained within this Range. Fully contained is defined as having the minimum and maximum values of the fully contained range lie within the range of values of the containing Range.

Parameters:
`x` - range to check
Returns:

### cos

```public static final Range cos(Range out,
Range x)```

### div

```public static final Range div(Range out,
Range x,
Range y)```

### mul

```public static final Range mul(Range out,
Range x,
Range y)```

### pow

```public static final Range pow(Range out,
Range x,
double e)```

### set

`public void set(double d)`

### set

```public void set(double min,
double max)```

### set

`public void set(Range r)`

### sin

```public static final Range sin(Range out,
Range x)```

### sqr

```public static final Range sqr(Range out,
Range x)```

### sqrt

```public static final Range sqrt(Range out,
Range x)```

### sub

```public static final Range sub(Range out,
Range x,
Range y)```

### tan

```public static final Range tan(Range out,
Range x)```

### toString

`public java.lang.String toString()`
Overrides:
`toString` in class `java.lang.Object`