CrystalSpace

Public API Reference

csgeom/math.h File Reference

Generic mathematic utility functions. More...

#include "csutil/algorithms.h"

Go to the source code of this file.

Namespaces

namespace  CS
 

Main namespace for CrystalSpace.


namespace  CS::Math
 

Mathematical functions and definitions.


Functions

template<class T >
csClamp (const T &a, T max, T min)
 Clamp a between max and min.
template<class T , class Tfactor >
csLerp (const T &a, const T &b, const Tfactor &f)
 Performs a linear interpolation between a and b with the factor f.
template<class T >
const T & csMax (const T &a, const T &b)
 Returns bigger of a and b.
template<class T >
const T & csMin (const T &a, const T &b)
 Returns smaller of a and b.
template<class T >
csSmoothStep (const T &a, T max, T min)
 Performs a smooth interpolation of a on range min to max.
template<class T , class U >
void csSort (T &a, T &b, U &x, U &y)
 Sort a and b in order of size.
template<class T >
void csSort (T &a, T &b)
 Sort a and b in order of size.
template<class T >
csSquare (const T &x)
 Returns the square of the argument.
template<typename T >
CS_FORCEINLINE_TEMPLATEMETHOD T CS::Math::NextModulo3 (T number)
 Return the next number in the sequence 0,1,2 modulo 3.

bool csFinite (float f)
 Checks if a floating point value is finite.
bool csFinite (double d)
 Checks if a double-precision floating point value is finite.
bool csNaN (float f)
 Checks if a floating point value is not-a-number.
bool csNaN (double d)
 Checks if a double-precision floating point value is not-a-number.
bool csNormal (float f)
 Checks if a floating point value is normal (not infinite or nan).
bool csNormal (double d)
 Checks if a double-precision floating point value is normal.

Detailed Description

Generic mathematic utility functions.

Definition in file math.h.


Generated for Crystal Space 1.4.1 by doxygen 1.7.1