#include "IrrCompileConfig.h"
#include "irrTypes.h"
#include <math.h>
#include <float.h>
#include <stdlib.h>
#include <limits.h>
Go to the source code of this file.
Classes
Namespaces
- namespace irr
Everything in the Irrlicht Engine can be found in this namespace.
- namespace irr::core
Basic classes such as vectors, planes, arrays, lists, and so on can be found in this namespace.
Defines
Functions
- template<class T > T irr::core::abs_ (const T &a)
- returns abs of two values. Own implementation to get rid of STL (VS6 problems)
- REALINLINE s32 irr::core::ceil32 (f32 x)
- template<class T > const T irr::core::clamp (const T &value, const T &low, const T &high)
- clamps a value between low and high
- REALINLINE void irr::core::clearFPUException ()
- f32 irr::core::degToRad (f32 degrees)
- Utility function to convert a degrees value to radians.
- f64 irr::core::degToRad (f64 degrees)
- Utility function to convert a degrees value to radians.
- bool irr::core::equals (const f64 a, const f64 b, const f64 tolerance=ROUNDING_ERROR_f64)
- returns if a equals b, taking possible rounding errors into account
- bool irr::core::equals (const f32 a, const f32 b, const f32 tolerance=ROUNDING_ERROR_f32)
- returns if a equals b, taking possible rounding errors into account
- bool irr::core::equals (const s32 a, const s32 b, const s32 tolerance=ROUNDING_ERROR_S32)
- returns if a equals b, taking an explicit rounding tolerance into account
- bool irr::core::equals (const u32 a, const u32 b, const s32 tolerance=ROUNDING_ERROR_S32)
- returns if a equals b, taking an explicit rounding tolerance into account
- bool irr::core::equals (const s64 a, const s64 b, const s64 tolerance=ROUNDING_ERROR_S64)
- returns if a equals b, taking an explicit rounding tolerance into account
- bool irr::core::equalsByUlp (f32 a, f32 b, int maxUlpDiff)
- We compare the difference in ULP's (spacing between floating-point numbers, aka ULP=1 means there exists no float between).
- f32 irr::core::f32_max3 (const f32 a, const f32 b, const f32 c)
- f32 irr::core::f32_min3 (const f32 a, const f32 b, const f32 c)
- REALINLINE s32 irr::core::floor32 (f32 x)
- f32 irr::core::FR (u32 x)
- Floating-point representation of an integer value.
- f32 irr::core::FR (s32 x)
- f32 irr::core::fract (f32 x)
- REALINLINE u32 irr::core::if_c_a_else_0 (const s32 condition, const u32 a)
- conditional set based on mask and arithmetic shift
- REALINLINE u32 irr::core::if_c_a_else_b (const s32 condition, const u32 a, const u32 b)
- conditional set based on mask and arithmetic shift
- REALINLINE u16 irr::core::if_c_a_else_b (const s16 condition, const u16 a, const u16 b)
- conditional set based on mask and arithmetic shift
- u32 irr::core::IR (f32 x)
- bool irr::core::isnotzero (const f32 a, const f32 tolerance=ROUNDING_ERROR_f32)
- returns if a equals not zero, taking rounding errors into account
- bool irr::core::iszero (const f64 a, const f64 tolerance=ROUNDING_ERROR_f64)
- returns if a equals zero, taking rounding errors into account
- bool irr::core::iszero (const f32 a, const f32 tolerance=ROUNDING_ERROR_f32)
- returns if a equals zero, taking rounding errors into account
- bool irr::core::iszero (const s32 a, const s32 tolerance=0)
- returns if a equals zero, taking rounding errors into account
- bool irr::core::iszero (const u32 a, const u32 tolerance=0)
- returns if a equals zero, taking rounding errors into account
- bool irr::core::iszero (const s64 a, const s64 tolerance=0)
- returns if a equals zero, taking rounding errors into account
- template<class T > T irr::core::lerp (const T &a, const T &b, const f32 t)
- template<class T > const T & irr::core::max_ (const T &a, const T &b)
- returns maximum of two values. Own implementation to get rid of the STL (VS6 problems)
- template<class T > const T & irr::core::max_ (const T &a, const T &b, const T &c)
- returns maximum of three values. Own implementation to get rid of the STL (VS6 problems)
- template<class T > const T & irr::core::min_ (const T &a, const T &b)
- returns minimum of two values. Own implementation to get rid of the STL (VS6 problems)
- template<class T > const T & irr::core::min_ (const T &a, const T &b, const T &c)
- returns minimum of three values. Own implementation to get rid of the STL (VS6 problems)
- f32 irr::core::radToDeg (f32 radians)
- Utility function to convert a radian value to degrees.
- f64 irr::core::radToDeg (f64 radians)
- Utility function to convert a radian value to degrees.
- REALINLINE f32 irr::core::reciprocal (const f32 f)
- REALINLINE f64 irr::core::reciprocal (const f64 f)
- REALINLINE f32 irr::core::reciprocal_approxim (const f32 f)
- REALINLINE f64 irr::core::reciprocal_squareroot (const f64 x)
- REALINLINE f32 irr::core::reciprocal_squareroot (const f32 f)
- REALINLINE s32 irr::core::reciprocal_squareroot (const s32 x)
- REALINLINE s32 irr::core::round32 (f32 x)
- f32 irr::core::round_ (f32 x)
- s32 irr::core::s32_clamp (s32 value, s32 low, s32 high)
- s32 irr::core::s32_max (s32 a, s32 b)
- s32 irr::core::s32_min (s32 a, s32 b)
- REALINLINE void irr::core::setbit_cond (u32 &state, s32 condition, u32 mask)
- REALINLINE f32 irr::core::squareroot (const f32 f)
- REALINLINE f64 irr::core::squareroot (const f64 f)
- REALINLINE s32 irr::core::squareroot (const s32 f)
- REALINLINE s64 irr::core::squareroot (const s64 f)
- template<class T1 , class T2 > void irr::core::swap (T1 &a, T2 &b)
- swaps the content of the passed parameters
Variables
Define Documentation
#define AIR |
( |
|
x | ) |
(IR(x)&0x7fffffff) |
Absolute integer representation of a floating-point value.
Definition at line 356 of file irrMath.h.
#define F32_A_GREATER_B |
( |
|
a, |
|
|
|
b |
|
) |
| ((a) > (b)) |
#define F32_AS_S32 |
( |
|
f | ) |
(*((s32 *) &(f))) |
#define F32_AS_U32 |
( |
|
f | ) |
(*((u32 *) &(f))) |
#define F32_AS_U32_POINTER |
( |
|
f | ) |
( ((u32 *) &(f))) |
#define F32_EQUAL_0 |
( |
|
n | ) |
((n) == 0.0f) |
#define F32_EQUAL_1 |
( |
|
n | ) |
((n) == 1.0f) |
#define F32_EXPON_MANTISSA 0x7FFFFFFFU |
#define F32_GREATER_0 |
( |
|
n | ) |
((n) > 0.0f) |
#define F32_GREATER_EQUAL_0 |
( |
|
n | ) |
((n) >= 0.0f) |
#define F32_LOWER_0 |
( |
|
n | ) |
((n) < 0.0f) |
#define F32_LOWER_EQUAL_0 |
( |
|
n | ) |
((n) <= 0.0f) |
#define F32_SIGN_BIT 0x80000000U |
#define F32_VALUE_0 0x00000000 |
#define F32_VALUE_1 0x3f800000 |
#define FLT_MAX 3.402823466E+38F |
#define FLT_MIN 1.17549435e-38F |
#define IEEE_1_0 0x3f800000 |
integer representation of 1.0
Definition at line 367 of file irrMath.h.
#define IEEE_255_0 0x437f0000 |
integer representation of 255.0
Definition at line 369 of file irrMath.h.
#define REALINLINE inline |