Spherical.R1.Interval
Represents a closed interval on ℝ¹.
Summary
| add_point(interval, point) | Returns a copy of |
| approx_equal(first, second) | Reports whether the |
| center(interval) | Returns the midpoint of the |
| clamp_point(interval, point) | Returns the closest point in the |
| contains?(first, second) | Checks if the interval contains |
| expanded(interval, margin) | Returns an |
| interior_contains?(interval, point) | Checks if the |
| interior_intersects?(first, second) | Check if the interior of the |
| intersection(first, second) | Returns the interval containing all points common to |
| intersects?(first, second) | Check if |
| is_empty?(interval) | Checks whether the |
| is_equal?(interval, interval) | Checks if the intervals contains the same points |
| length(interval) | Returns the length of the |
| new() | Returns an empty interval |
| new(point) | Returns an interval representing a single |
| new(a, b) | Returns an interval between |
| union(first, second) | Returns the smallest interval that contains the |
Types
t :: %Spherical.R1.Interval{lo: number, hi: number}
Functions
Returns a copy of interval containing the given point.
Reports whether the first interval can be transformed into the
second interval by moving each endpoint a small distance.
The empty interval is considered to be positioned arbitrarily on the real line, so any interval with a small enough length will match the empty interval.
Returns the midpoint of the interval.
Returns the closest point in the interval to the given point.
The interval must be non-empty.
Checks if the interval contains point.
Returns an interval that has been expanded on each side by
margin.
If margin is negative, then the function shrinks the interval on
each side by margin instead. The resulting interval may be empty.
Any expansion of an empty interval remains empty.
Checks if the interval strictly contains point.
Check if the interior of the first contains any points in common
with second, including the latter’s boundary.
Returns the interval containing all points common to first and
second.
Check if first contains any points in common with second.
Checks whether the interval is empty.
Checks if the intervals contains the same points.
Returns the length of the interval.
The length of an empty interval is negative.
Returns an empty interval.
Returns an interval representing a single point.
Returns an interval between a and b.
Returns the smallest interval that contains the first and second
intervals.