Macros | Functions
ionUtils.h File Reference

General helper functions. More...

#include "ionConfig.h"
#include "ionTypes.h"
#include "ionComparison.h"
#include <iostream>
Include dependency graph for ionUtils.h:

Go to the source code of this file.

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

template<typename T >
Clamp (T const &v, T const &min, T const &max)
 
template<typename T >
Sq (T const &a)
 
template<typename T >
Average (T const &a, T const &b)
 
template<typename T >
Average (T const &a, T const &b, T const &c)
 
template<typename T >
Average (T const &a, T const &b, T const &c, T const &d)
 
template<typename T >
MakeEven (T const i)
 
template<typename T >
s32 Sign (T const &val)
 
template<typename T >
ToggleBool (T &Condition)
 

Detailed Description

General helper functions.