range.js
No description.

File Location

/goog/math/range.js

Classes

goog.math.Range
A number range.

Public Protected Private

Global Functions

goog.math.Range.boundingRange(ab) !goog.math.Range
Given two ranges on the same dimension, this returns a range that covers both ranges.
Arguments:
a : goog.math.Range
A Range.
b : goog.math.Range
A Range.
Returns: !goog.math.Range  A new Range representing the bounding range.
code »
goog.math.Range.contains(ab) boolean
Given two ranges, returns true if the first range completely overlaps the second.
Arguments:
a : goog.math.Range
The first Range.
b : goog.math.Range
The second Range.
Returns: boolean  True if b is contained inside a, false otherwise.
code »
goog.math.Range.containsPoint(rangep) boolean
Given a range and a point, returns true if the range contains the point.
Arguments:
range : goog.math.Range
The range.
p : number
The point.
Returns: boolean  True if p is contained inside range, false otherwise.
code »
goog.math.Range.equals(ab) boolean
Compares ranges for equality.
Arguments:
a : goog.math.Range
A Range.
b : goog.math.Range
A Range.
Returns: boolean  True iff both the starts and the ends of the ranges are equal, or if both ranges are null.
code »
goog.math.Range.fromPair(pair) !goog.math.Range
Creates a goog.math.Range from an array of two numbers.
Arguments:
pair : !Array.<number>
No description.
Returns: !goog.math.Range  No description.
code »
goog.math.Range.hasIntersection(ab) boolean
Given two ranges on the same dimension, determines whether they intersect.
Arguments:
a : goog.math.Range
A Range.
b : goog.math.Range
A Range.
Returns: boolean  Whether they intersect.
code »
goog.math.Range.intersection(ab) goog.math.Range
Given two ranges on the same dimension, this method returns the intersection of those ranges.
Arguments:
a : goog.math.Range
A Range.
b : goog.math.Range
A Range.
Returns: goog.math.Range  A new Range representing the intersection of two ranges, or null if there is no intersection. Ranges are assumed to include their end points, and the intersection can be a point.
code »

Directory math

File Reference