I need to check if a double-defined variable is convertible to Int without losing its value. This doesn\'t work because they are of different types:
if self.
extension FloatingPoint { var isWholeNumber: Bool { isNormal ? self == rounded() : isZero } } let double = 3.0 double.isWholeNumber // true print(3.15.isWholeNumber) // false