From a16e2d5a6e6b50592ea45dd6b5c01fe3ccfad87c Mon Sep 17 00:00:00 2001 From: bumbread Date: Thu, 16 Jun 2022 23:39:50 +1100 Subject: [PATCH] bababbababababababa --- src/code/math/_util.h | 10 ---------- src/code/math/round.c | 10 +++++++++- 2 files changed, 9 insertions(+), 11 deletions(-) delete mode 100644 src/code/math/_util.h diff --git a/src/code/math/_util.h b/src/code/math/_util.h deleted file mode 100644 index e640e7a..0000000 --- a/src/code/math/_util.h +++ /dev/null @@ -1,10 +0,0 @@ - -#define asuint64(x) ((union {double f; uint64_t i;}){x}).i -#define asdouble(x) ((union {double f; uint64_t i;}){x}).f - -#include <_compiler.h> -#if defined(_compiler_clang) || defined(_compiler_gnu) - #define just_do_it(t) __attribute__((unused)) volatile t -#else - #define just_do_it(t) volatile t -#endif diff --git a/src/code/math/round.c b/src/code/math/round.c index 4b7f1f5..96a6659 100644 --- a/src/code/math/round.c +++ b/src/code/math/round.c @@ -5,7 +5,15 @@ #include #include -#include "_util.h" +#define asuint64(x) ((union {double f; uint64_t i;}){x}).i +#define asdouble(x) ((union {double f; uint64_t i;}){x}).f + +#include <_compiler.h> +#if defined(_compiler_clang) || defined(_compiler_gcc) + #define just_do_it(t) __attribute__((unused)) volatile t +#else + #define just_do_it(t) volatile t +#endif double nearbyint(double x) { #pragma STDC FENV_ACCESS ON