struct
HalfOpenInterval
<
T
:
Comparable
>
Inheritance |
DebugPrintable, Equatable, IntervalType, Printable, Reflectable
View Protocol Hierarchy →
|
---|---|
Associated Types |
The type of the |
Import |
|
Initializers
Construct an interval with the given bounds. Requires: start
<= end
.
Declaration
init
(
_
start
:
T
,
_
end
:
T
)
Instance Variables
A textual representation of self
, suitable for debugging.
Declaration
var
debugDescription
:
String
{
get
}
The Interval
's upper bound. Invariant: start
<= end
Declaration
var
end
:
T
{
get
}
The Interval
's lower bound. Invariant: start
<= end
Declaration
var
start
:
T
{
get
}
Instance Methods
Return intervalToClamp
clamped to self
. The bounds of the
result, even if it is empty, are always limited to the bounds of
self
Declaration
func
clamp
(
intervalToClamp
:
HalfOpenInterval
<
T
>
) -
>
HalfOpenInterval
<
T
>
A half-open
IntervalType
, which contains itsstart
but not itsend
. Can represent an empty interval.