Eric Oulashin's C++ Audio Mixer 1.0
utilFunctions.h
Go to the documentation of this file.
1#ifndef __UTIL_FUNCTIONS_H__
2#define __UTIL_FUNCTIONS_H__
3
4
5namespace EOUtils
6{
7 // Returns the highest positive value of a numeric type.
8 template<typename T> T maxValue()
9 {
10 T value = 0;
11
12 while (value <= 0)
13 --value;
14
15 return(value);
16 }
17
18 // Returns the lowest value of a numeric type.
19 template<typename T> T minValue()
20 {
21 T value = 1;
22
23 while (value > 0)
24 ++value;
25
26 return(value);
27 }
28}
29
30#endif
Definition StringUtils.cpp:6
T maxValue()
Definition utilFunctions.h:8
T minValue()
Definition utilFunctions.h:19