mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-12-07 16:42:45 +00:00
Add floating point epsilons
This commit is contained in:
parent
b056842deb
commit
0c9be9fd4b
1 changed files with 9 additions and 0 deletions
|
|
@ -453,6 +453,15 @@ INT32 I_GetKey(void);
|
||||||
#define max(x, y) (((x) > (y)) ? (x) : (y))
|
#define max(x, y) (((x) > (y)) ? (x) : (y))
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
// Floating point comparison epsilons from float.h
|
||||||
|
#ifndef FLT_EPSILON
|
||||||
|
#define FLT_EPSILON 1.1920928955078125e-7f
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef DBL_EPSILON
|
||||||
|
#define DBL_EPSILON 2.2204460492503131e-16
|
||||||
|
#endif
|
||||||
|
|
||||||
// An assert-type mechanism.
|
// An assert-type mechanism.
|
||||||
#ifdef PARANOIA
|
#ifdef PARANOIA
|
||||||
#define I_Assert(e) ((e) ? (void)0 : I_Error("assert failed: %s, file %s, line %d", #e, __FILE__, __LINE__))
|
#define I_Assert(e) ((e) ? (void)0 : I_Error("assert failed: %s, file %s, line %d", #e, __FILE__, __LINE__))
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue