tim-balloon / TIMflight

Flight MCP repo
0 stars 0 forks source link

Issue 5: floating point in equality comparison commands.c #14

Closed mxk62 closed 2 years ago

mxk62 commented 2 years ago

Pull request provides two functions allowing one to compare floating-point numbers more reliably and replaces existing direct comparisons (using != operator) with one of these functions is_almost_equal().

Since these functions are pretty generic (all other submodules may potentially need to use them at some point) I decided to create a new submodule called utils for such functions. If you think these function should be placed somewhere else, I'm open for suggestions.

evanmayer commented 2 years ago

Merge away!