mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
core: move floating point functions to own header file
This were in subsurface-string.h for unknown reasons. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
61701509b0
commit
aa4b48f440
12 changed files with 35 additions and 20 deletions
|
@ -5,7 +5,6 @@
|
|||
#include <stdbool.h>
|
||||
#include <string.h>
|
||||
#include <time.h>
|
||||
#include <math.h>
|
||||
|
||||
// shared generic definitions and macros
|
||||
// mostly about strings, but a couple of math macros are here as well
|
||||
|
@ -27,16 +26,6 @@
|
|||
extern "C" {
|
||||
#endif
|
||||
|
||||
static inline bool nearly_equal(double a, double b)
|
||||
{
|
||||
return fabs(a - b) <= 1e-6 * fmax(fabs(a), fabs(b));
|
||||
}
|
||||
|
||||
static inline bool nearly_0(double fp)
|
||||
{
|
||||
return fabs(fp) <= 1e-6;
|
||||
}
|
||||
|
||||
// string handling
|
||||
|
||||
static inline bool same_string(const char *a, const char *b)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue