Skip to content

Instantly share code, notes, and snippets.

@mebjas
Created October 5, 2022 09:34
Show Gist options
  • Select an option

  • Save mebjas/243d18b92af7a14751e52b1d239ddfb7 to your computer and use it in GitHub Desktop.

Select an option

Save mebjas/243d18b92af7a14751e52b1d239ddfb7 to your computer and use it in GitHub Desktop.
isNearlyEqual doesn't work well for larger floating values when using FLT_EPSILON
float a = 100.151f + 0.151f;
float b = 100.101f + 0.201f;
bool d = isNearlyEqual(a, b);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment