Simple Application Framework  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Functions
Saf::Math::Calculus Namespace Reference

Calculus related functions and classes. More...

Functions

template<class T >
BinaryLogarithm (T val)
 Binary logarithm of a positive integer val.
template<class T >
bool IsPowerOf2 (T val)
 Returns true if val is a positive power of 2.
template<class T >
NearestPowerOf2 (T val)
 Power of 2 nearest to the integer val.
template<class T >
Pow (T x, T y)
 Calculate $ x^y $.
template<class T >
RoundDownToPowerOf2 (T val)
 Get the nearest power of 2 less than or equal to integer val.
template<class T >
RoundUpToPowerOf2 (T val)
 Get the nearest power of 2 greater than or equal to integer val.
template<class T >
Sqr (T x)
 Calculate $ x^2 $.
template<class T >
Sqrt (T x)
 Calculate $ \sqrt{x} $.

Detailed Description

Calculus related functions and classes.


Function Documentation

template<class T >
T SAF_DLL_EXPORT Saf::Math::Calculus::BinaryLogarithm ( val)

Binary logarithm of a positive integer val.

template<class T >
bool Saf::Math::Calculus::IsPowerOf2 ( val) [inline]

Returns true if val is a positive power of 2.

template<class T >
T SAF_DLL_EXPORT Saf::Math::Calculus::NearestPowerOf2 ( val)

Power of 2 nearest to the integer val.

template<class T >
T Saf::Math::Calculus::Pow ( x,
y 
) [inline]

Calculate $ x^y $.

template<class T >
T Saf::Math::Calculus::RoundDownToPowerOf2 ( val) [inline]

Get the nearest power of 2 less than or equal to integer val.

template<class T >
T SAF_DLL_EXPORT Saf::Math::Calculus::RoundUpToPowerOf2 ( val)

Get the nearest power of 2 greater than or equal to integer val.

template<class T >
T Saf::Math::Calculus::Sqr ( x) [inline]

Calculate $ x^2 $.

template<class T >
T Saf::Math::Calculus::Sqrt ( x) [inline]

Calculate $ \sqrt{x} $.

Defined for floating point types only.