Math functions for computer graphics. More...
#include "math/funcs_debug.hh"Go to the source code of this file.
Namespaces | |
| namespace | math |
math functions | |
| namespace | math::defs |
Defines | |
| #define | IfNan(N) (UX(!std::isfinite(N))) |
Functions | |
| template<typename FP > | |
| bool | math::FP_EQ (FP a, FP b) |
| template<typename FP > | |
| bool | math::FP_LE (FP a, FP b) |
| template<typename FP > | |
| bool | math::FP_GE (FP a, FP b) |
| template<typename T1 , typename T2 > | |
| bool | math::IfSameSign (const T1 a, const T2 b) |
| template<typename FP > | |
| FP | math::SquareRoot (FP f) |
| template<typename T > | |
| T | math::Square (T x) |
| template<typename T > | |
| T | math::Average (T x, T y) |
| template<typename T > | |
| T | math::Range (T val, T lo, T hi) |
| template<typename T > | |
| T | math::IfInRange (T a0, T a1, T b0, T b1) |
| INLINE fp | math::FractionInRange (fp n, fp low, fp high) |
| INLINE fp | math::Remap (fp value, fp rangeOld, fp rangeNew) |
| INLINE fp | math::Truncate (fp val, fp interval) |
| template<typename T > | |
| T | math::ModuloAbs (const T n, const T limit) |
Variables | |
| const fpx | math::defs::FP_DELTA_TOLERANCE = 0.001 |
| used for comparing fp values | |
Math functions for computer graphics.
| #define IfNan | ( | N | ) | (UX(!std::isfinite(N))) |
IfNan() returns true if a Not-A-Number or Infinity. C99 isfinite() is true if neither NaN nor infinity. Technically, divide-by-zero results in Infinity, not NaN, but IfNan() is used to check divide errors. A NaN never equals any number -- not even itself. !(n==n) is unreliable because smart compilers will optimize as always false (gcc will).
Palomino Flight Simulator documents generated by doxygen 1.7.1 on Tue May 15 2012 22:40:10