Namespaces | Macros | Functions
ionUtils.h File Reference

General helper functions. More...

#include "ionTypes.h"
Include dependency graph for ionUtils.h:

Go to the source code of this file.

Namespaces

 ion
 

Macros

#define ION_ARRAYSIZE(x)   ((sizeof(x)/sizeof(0[x])) / ((size_t)(!(sizeof(x) % sizeof(0[x])))))
 Standard macro for computing size of a C-style arrayMore discussion here: https://stackoverflow.com/a/4415646/1390945. More...
 

Functions

void ion::WaitForUser ()
 Portable version of system("PAUSE") More...
 
int ion::DigitCount (int n)
 Count the number of digits (including a - for negative numbers) in a decimal integer. More...
 
int ion::MakeEven (int const i)
 
bool ion::ToggleBool (bool &Condition)
 
float ion::Saturate (float const v)
 
double ion::Saturate (double const v)
 
template<typename T >
ion::Clamp (T const v, T const min, T const max)
 
template<typename T >
ion::Sq (T const a)
 
template<typename T >
ion::Average (T const a, T const b)
 
template<typename T >
ion::Average (T const a, T const b, T const c)
 
template<typename T >
ion::Average (T const a, T const b, T const c, T const d)
 
template<typename T >
ion::Sign (T const val)
 

Detailed Description

General helper functions.