Instance Property

sign

minus if the sign bit of self is set, and plus otherwise. Implements the IEEE 754 signbit operation.

Declaration

var sign: FloatingPointSign { get }

Discussion

Note that the property x.sign == .minus is not the same as x < 0. In particular, x < 0 while x.sign == .minus if x is -0, and while x < 0 is always false if x is NaN, x.sign could be either .plus or .minus.

Relationships

From Protocol

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software