Euphoria
numeric.h File Reference

Go to the source code of this file.

Namespaces

 eu
 

Macros

#define EU_MAKE_MINMAX(T)
 

Functions

constexpr float eu::abs (float r)
 
constexpr bool eu::is_zero (float r)
 
constexpr bool eu::is_equal (float lhs, float rhs)
 
bool eu::is_equal (int lhs, int rhs)
 
bool eu::is_zero (int r)
 
float eu::clamp_zero (float r)
 
float eu::floor (float v)
 
float eu::ceil (float v)
 
int eu::floor_to_int (float v)
 
int eu::ceil_to_int (float v)
 
int eu::get_sign (float r)
 Calculates the sign as a positive or a negative int. More...
 
int eu::get_sign (int r)
 
float eu::get_sign (bool b)
 Returns either 1 or -1. More...
 
float eu::lerp_float (float f, float scale, float t)
 
 eu::DEFAULT_INTERPOLATE (float, lerp_float)
 
float eu::square (float r)
 
float eu::sqrt (float r)
 
float eu::mod (float numer, float denumer)
 
bool eu::is_within_inclusive_as_int (int min, int c, int max)
 
float eu::round (float num, float gran)
 Rounds a value to the nearest nice value. More...
 
template<typename T >
eu::get_default_if_close_to_zero (T value, T def, T epsilon)
 
template<typename I >
constexpr bool eu::is_each_nth (I i, I each)
 returns true for a index each Nth loop. More...
 

Variables

constexpr float eu::pi = 3.1415926535897932384626433832795f
 

Macro Definition Documentation

◆ EU_MAKE_MINMAX

#define EU_MAKE_MINMAX (   T)
Value:
constexpr T min(T lhs, T rhs) \
{ \
if (lhs < rhs) \
{ \
return lhs; \
} \
\
return rhs; \
} \
constexpr T max(T lhs, T rhs) \
{ \
if (lhs > rhs) \
{ \
return lhs; \
} \
\
return rhs; \
}
size2f min(const size2f lhs, const size2f rhs)
Definition: size2.cc:140
size2f max(const size2f lhs, const size2f rhs)
Definition: size2.cc:149

Definition at line 79 of file numeric.h.