开发者

Xcode - Comparison of a Double

开发者 https://www.devze.com 2023-01-27 08:48 出处:网络
Hey all, I need to compare a double inside开发者_JAVA技巧 an if statement. If the double has no value/is equal to zero, it should do nothing. Otherwise it should do something.

Hey all, I need to compare a double inside开发者_JAVA技巧 an if statement. If the double has no value/is equal to zero, it should do nothing. Otherwise it should do something.

My if statement if (doubleNameHere > 0) doesn't work.

Obviously I'm missing something fundamental here, any ideas?


Sorry all, it turns out that it wasn't set to zero, it was equal to another blank double value. I started it at zero and it was fine.

0

精彩评论

暂无评论...
验证码 换一张
取 消