Created
May 13, 2020 08:48
-
-
Save todorok1/98881e32041306d88c2314f5bdc044f5 to your computer and use it in GitHub Desktop.
floatの計算には誤差がつきもの
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
float a = 0.1f; | |
float b = 0.2f; | |
if (a + b == 0.3f) | |
{ | |
// ここにたどり着けない……。 | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment