Instance Property


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


var sign: FloatingPointSign { get }


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.


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