goog.math.Range
Instance Methods
this.clone() → goog.math.Range
goog.math.Range
Parameters | None. | ||
---|---|---|---|
Returns |
|
this.getLength() → number
number
Parameters | None. | ||
---|---|---|---|
Returns |
|
this.includePoint( point ) → void
void
this.includeRange( range ) → void
void
this.toString() → string
string
Returns a string representing the range.
Parameters | None. | ||
---|---|---|---|
Returns |
|
Instance Properties
this.end → number
number
The highest value in the range.
this.start → number
number
The lowest value in the range.
Static Functions
Range.boundingRange( a, b ) → goog.math.Range
goog.math.Range
Given two ranges on the same dimension, this returns a range that covers both ranges.
Parameters |
| ||||||||
---|---|---|---|---|---|---|---|---|---|
Returns |
|
Range.contains( a, b ) → boolean
boolean
Given two ranges, returns true if the first range completely overlaps the second.
Parameters |
| ||||||||
---|---|---|---|---|---|---|---|---|---|
Returns |
|
Range.containsPoint( range, p ) → boolean
boolean
Given a range and a point, returns true if the range contains the point.
Parameters |
| ||||||||
---|---|---|---|---|---|---|---|---|---|
Returns |
|
Range.equals( a, b ) → boolean
boolean
Compares ranges for equality.
Parameters |
| ||||||||
---|---|---|---|---|---|---|---|---|---|
Returns |
|
Range.fromPair( pair ) → goog.math.Range
goog.math.Range
Creates a goog.math.Range from an array of two numbers.
Parameters |
| ||||
---|---|---|---|---|---|
Returns |
|
Range.hasIntersection( a, b ) → boolean
boolean
Given two ranges on the same dimension, determines whether they intersect.
Parameters |
| ||||||||
---|---|---|---|---|---|---|---|---|---|
Returns |
|
Range.intersection( a, b ) → (goog.math.Range|null)
(goog.math.Range|null)
Given two ranges on the same dimension, this method returns the intersection of those ranges.
Parameters |
| ||||||||
---|---|---|---|---|---|---|---|---|---|
Returns |
|