Skip to content

Instantly share code, notes, and snippets.

@armstrongnate
Created March 17, 2014 15:46
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 armstrongnate/9601778 to your computer and use it in GitHub Desktop.
Save armstrongnate/9601778 to your computer and use it in GitHub Desktop.
comparing floats
epsilon = .000001
x1 and x2 are equal if (fabs(x1 - x2) < epsilon)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment