struct
Double
Initializers
Create an instance initialized to zero.
Declaration
init
()
Declaration
init
(
_
v
:
Int
)
Declaration
init
(
_
v
:
Int8
)
Declaration
init
(
_
v
:
Int16
)
Declaration
init
(
_
v
:
Int32
)
Declaration
init
(
_
v
:
Int64
)
[Foundation]
Declaration
init
(
_
number
:
NSNumber
)
Declaration
init
(
_
v
:
UInt
)
Declaration
init
(
_
v
:
UInt8
)
Declaration
init
(
_
v
:
UInt16
)
Declaration
init
(
_
v
:
UInt32
)
Declaration
init
(
_
v
:
UInt64
)
Declaration
init
(
_bits
v
:
Builtin
.
FPIEEE64
)
Declaration
init
(
_builtinFloatLiteral
value
:
Builtin
.
FPIEEE80
)
Declaration
init
(
_builtinIntegerLiteral
value
:
Builtin
.
Int2048
)
Construct from an ASCII representation.
Returns the result of calling the POSIX function
strtod_l
using the "C" locale, unless
text
contains non-ASCII text or whitespace, or is not
completely consumed by the call. Otherwise, returns nil
.
See the strtod (3)
man page for details of
the exact format accepted.
Declaration
init
?(
_
text
:
String
)
Static Variables
Instance Variables
The IEEE 754 "class" of this type.
Declaration
var
floatingPointClass
:
FloatingPointClassification
{
get
}
The hash value.
Axiom: x == y
implies x.hashValue == y.hashValue
.
Note: The hash value is not guaranteed to be stable across different invocations of the same program. Do not persist the hash value across program runs.
Declaration
var
hashValue
:
Int
{
get
}
true
iff self
is zero, subnormal, or normal (not infinity
or NaN).
Declaration
var
isFinite
:
Bool
{
get
}
true
iff self
is normal (not zero, subnormal, infinity, or
NaN).
Declaration
var
isNormal
:
Bool
{
get
}
Static Methods
Instance Methods
Returns the sequence of values (self
, self + stride
, self +
stride + stride
, ... last) where last is the last value in
the progression less than or equal to end
.
Note: There is no guarantee that end
is an element of the sequence.
Declaration
func
stride
(
through
end
:
Double
,
by
stride
:
Double
.
Stride
) -
>
StrideThrough
<
Double
>
Declared In
Strideable
Returns the sequence of values (self
, self + stride
, self +
stride + stride
, ... last) where last is the last value in
the progression that is less than end
.
Declaration
Declared In
Strideable
2 inherited items hidden. (Show all)
A double-precision floating-point value type.