Skip to content

Instantly share code, notes, and snippets.

@todorok1
Created May 13, 2020 08:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save todorok1/98881e32041306d88c2314f5bdc044f5 to your computer and use it in GitHub Desktop.
Save todorok1/98881e32041306d88c2314f5bdc044f5 to your computer and use it in GitHub Desktop.
floatの計算には誤差がつきもの
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