How to check Swift if the calculation result is not infinite?
My code below is reset after printing that "dividepointsbyrest is inf". "If dividepointsbyrest! = Nil" checks for nil. "If dividepointsbyrest! = Inf 'does not work.
var dividepointsbyrest = (BPMpoints / restDouble)
print("dividepointsbyrest is")
print(dividepointsbyrest)
var BPMpercentD = 100.0 * dividepointsbyrest
source
share