check if nan swift
let x = 0.0
let y = x * .infinity
// y is a NaN
// Comparing with the equal-to operator never returns 'true'
print(x == Double.nan)
// Prints "false"
print(y == Double.nan)
// Prints "false"
// Test with the 'isNaN' property instead
print(x.isNaN)
// Prints "false"
print(y.isNaN)
// Prints "true"
Also in Swift:
- deselect all cell in collectionview
- get presented view controller swift
- swift initialize a view
- swift share with
- generate hmac swift
- swift how to sort array
- alertdialog flutter
- swift VStack
- how to know when text changed textfield swiftui
- add buton border swift
- string.format swift
- deselect cell swift
- index string swift
- ui alert swift yes no
- swift initialize array with size
- int in swift
- stack view xcode
- swiftui font color
- how to Not bool bindng swiftui
- UI API called on a background thread
- swift hide navigation bar
- swift play audio file
- create alert in swift
- swift array to string