Simple Application Framework  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Namespaces | Functions
Saf/Math/Calculus/Powers.h File Reference

Powers and basic functions related to exponentiation.
More...

#include <math.h>
#include "../../Core.h"
#include "../../Type.h"
#include "../../InvalidOperationException.h"
#include "../../ArgumentException.h"

Go to the source code of this file.

Namespaces

namespace  Saf
 Global library namespace.
namespace  Saf::Math
 Mathematical functions and structures.
namespace  Saf::Math::Calculus
 Calculus related functions and classes.

Functions

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

Detailed Description

Powers and basic functions related to exponentiation.
Author:
Ondrej Danek ondre.nosp@m.j.da.nosp@m.nek@g.nosp@m.mail.nosp@m..com
Date:
2010