|
Simple Application Framework
1
|
Powers and basic functions related to exponentiation.
#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 > | |
| 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 > | |
| T | Saf::Math::Calculus::NearestPowerOf2 (T val) |
Power of 2 nearest to the integer val. | |
| template<class T > | |
| T | Saf::Math::Calculus::Pow (T x, T y) |
Calculate . | |
| template<class T > | |
| T | Saf::Math::Calculus::RoundDownToPowerOf2 (T val) |
Get the nearest power of 2 less than or equal to integer val. | |
| template<class T > | |
| T | Saf::Math::Calculus::RoundUpToPowerOf2 (T val) |
Get the nearest power of 2 greater than or equal to integer val. | |
| template<class T > | |
| T | Saf::Math::Calculus::Sqr (T x) |
Calculate . | |
| template<class T > | |
| T | Saf::Math::Calculus::Sqrt (T x) |
Calculate . | |
Powers and basic functions related to exponentiation.
1.8.0