If you have code around that uses lots of F’s (e.g. 0xFFFFFFFF) or capital letters (e.g. UINT32_MAX), consider replacing these constants with built-in Swift versions.
Swift offers .max and .min properties for many numeric types. For example:
public func Random01() -> Double { return Double(arc4random()) / Double(UInt32.max) }
Comments are closed.