Represents an interval.
More...
#include <Interval.h>
| SFCGAL::detail::Interval::Interval |
( |
| ) |
|
default constructor (empty interval)
| SFCGAL::detail::Interval::Interval |
( |
const double & |
value | ) |
|
collapsed interval constructor
- Parameters
-
| value | The single value for collapsed interval |
| SFCGAL::detail::Interval::Interval |
( |
const double & |
value1, |
|
|
const double & |
value2 |
|
) |
| |
constructor with two values
- Parameters
-
| value1 | First boundary value |
| value2 | Second boundary value |
| SFCGAL::detail::Interval::Interval |
( |
const Interval & |
other | ) |
|
|
default |
copy constructor
- Parameters
-
| other | The interval to copy from |
| void SFCGAL::detail::Interval::expandBy |
( |
const double & |
expandAmount | ) |
|
expand the interval
- Warning
- no effect if isEmpty()
- Parameters
-
| expandAmount | The amount to expand by |
| void SFCGAL::detail::Interval::expandToInclude |
( |
const Interval & |
other | ) |
|
expand the interval to include an other interval.
- Warning
- no effect if other.isEmpty()
- Parameters
-
| other | The interval to include |
| void SFCGAL::detail::Interval::expandToInclude |
( |
const double & |
value | ) |
|
expand the interval to include a value
- Warning
- no effect if value is NaN
- Parameters
-
| value | The value to include |
| auto SFCGAL::detail::Interval::intersects |
( |
const Interval & |
other | ) |
const |
test if this intersects other
- Parameters
-
| other | The interval to test intersection with |
- Returns
- True if intervals intersect
| auto SFCGAL::detail::Interval::isEmpty |
( |
| ) |
const |
indicates if the interval is empty
- Returns
- True if the interval is empty
| const double& SFCGAL::detail::Interval::lower |
( |
| ) |
const |
|
inline |
return the lower value
- Returns
- The lower boundary of the interval
| auto SFCGAL::detail::Interval::operator!= |
( |
const Interval & |
other | ) |
const |
compare two intervals
- Warning
- false for empty intervals
- Parameters
-
| other | The interval to compare with |
- Returns
- True if intervals are not equal
| auto SFCGAL::detail::Interval::operator= |
( |
const Interval & |
other | ) |
-> Interval & |
|
default |
assign operator
- Parameters
-
| other | The interval to assign from |
- Returns
- Reference to this interval
| auto SFCGAL::detail::Interval::operator== |
( |
const Interval & |
other | ) |
const |
compare two intervals
- Warning
- true for empty intervals
- Parameters
-
| other | The interval to compare with |
- Returns
- True if intervals are equal
| const double& SFCGAL::detail::Interval::upper |
( |
| ) |
const |
|
inline |
return the upper value
- Returns
- The upper boundary of the interval
| double SFCGAL::detail::Interval::width |
( |
| ) |
const |
|
inline |
return the width of the interval
- Returns
- The width (upper - lower) of the interval