struct
HalfOpenInterval
<
Bound
:
Comparable
>
Inheritance |
CustomDebugStringConvertible, CustomPlaygroundQuickLookable, CustomReflectable, CustomStringConvertible, Equatable, Interval
View Protocol Hierarchy →
|
---|---|
Import |
|
Initializers
Construct a copy of x
.
Declaration
init
(
_
x
:
HalfOpenInterval
<
Bound
>
)
Instance Variables
Declaration
var
customPlaygroundQuickLook
:
PlaygroundQuickLook
{
get
}
A textual representation of self
, suitable for debugging.
Declaration
var
debugDescription
:
String
{
get
}
The Interval
's upper bound.
Invariant: start
<= end
.
Declaration
var
end
:
Bound
{
get
}
The Interval
's lower bound.
Invariant: start
<= end
.
Declaration
var
start
:
Bound
{
get
}
Instance Methods
Returns 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
<
Bound
>
) -
>
HalfOpenInterval
<
Bound
>
1 inherited item hidden. (Show all)
A half-open
Interval
, which contains itsstart
but not itsend
. Can represent an empty interval.Bound
: The type of the endpoints.