Initializerswift 6.0.1Swift
init(signOf:magnitudeOf:)
init(signOf sign: Float, magnitudeOf mag: Float)
Other members in extension
Types
struct SIMD16Storage
Storage for a vector of 16 floating-point values.
struct SIMD2Storage
Storage for a vector of two floating-point values.
struct SIMD32Storage
Storage for a vector of 32 floating-point values.
struct SIMD4Storage
Storage for a vector of four floating-point values.
struct SIMD64Storage
Storage for a vector of 64 floating-point values.
struct SIMD8Storage
Storage for a vector of eight floating-point values.
Typealiases
Type members
init(
) init(Float
) Creates a new instance initialized to the given value.
init(Double
) Creates a new instance that approximates the given value.
init?(Substring
) init?<S>(S
) Creates a new instance from the given string.
init(Int
) init(Float16
) Creates a new instance that approximates the given value.
init<Source>(Source
) init(bitPattern: UInt32
) Creates a new value with the given bit pattern.
init?(exactly: Double
) Creates a new instance initialized to the given value, if it can be represented without rounding.
init?(exactly: Float
) Creates a new instance initialized to the given value, if it can be represented without rounding.
init?(exactly: Float16
) Creates a new instance initialized to the given value, if it can be represented without rounding.
init?<Source>(exactly: Source
) init(floatLiteral: Float
) init(from: any Decoder
) throws init(integerLiteral: Int64
) init(nan: Float.RawSignificand, signaling: Bool
) Creates a NaN (“not a number”) value with the specified payload.
init(sign: FloatingPointSign, exponent: Int, significand: Float
) init(sign: FloatingPointSign, exponentBitPattern: UInt, significandBitPattern: UInt32
) static var exponentBitCount: Int
static var greatestFiniteMagnitude: Float
static var infinity: Float
static var leastNonzeroMagnitude: Float
static var leastNormalMagnitude: Float
static var nan: Float
static var pi: Float
static var signalingNaN: Float
static var significandBitCount: Int
static var ulpOfOne: Float
The unit in the last place of 1.0.
static func * (lhs: Float, rhs: Float
) -> Float static func *= (lhs: inout Float, rhs: Float
) static func + (lhs: Float, rhs: Float
) -> Float static func += (lhs: inout Float, rhs: Float
) static func - (x: Float
) -> Float static func - (lhs: Float, rhs: Float
) -> Float static func -= (lhs: inout Float, rhs: Float
) static func / (lhs: Float, rhs: Float
) -> Float static func /= (lhs: inout Float, rhs: Float
)
Instance members
var binade: Float
var bitPattern: UInt32
The bit pattern of the value’s encoding.
var customMirror: Mirror
A mirror that reflects the
Float
instance.var debugDescription: String
A textual representation of the value, suitable for debugging.
var description: String
A textual representation of the value.
var exponent: Int
var exponentBitPattern: UInt
var isCanonical: Bool
var isFinite: Bool
var isInfinite: Bool
var isNaN: Bool
var isNormal: Bool
var isSignalingNaN: Bool
var isSubnormal: Bool
var isZero: Bool
var magnitude: Float
var nextUp: Float
var sign: FloatingPointSign
var significand: Float
var significandBitPattern: UInt32
var significandWidth: Int
var ulp: Float
func addProduct(Float, Float
) func advanced(by: Float
) -> Float func distance(to: Float
) -> Float func encode(to: any Encoder
) throws Encodes this value into the given encoder.
func formRemainder(dividingBy: Float
) func formSquareRoot(
) func formTruncatingRemainder(dividingBy: Float
) func hash(into: inout Hasher
) func isEqual(to: Float
) -> Bool func isLess(than: Float
) -> Bool func isLessThanOrEqualTo(Float
) -> Bool func negate(
) func round(FloatingPointRoundingRule
) func write<Target>(to: inout Target
)
Show obsolete interfaces (1)
Hide obsolete interfaces
var customPlaygroundQuickLook: _PlaygroundQuickLook
A custom playground Quick Look for the
Float
instance.