Eric Oulashin's C++ Audio Mixer
1.0
home
erico
projects
audio_mixer_cpp
code
common
utilFunctions.h
Go to the documentation of this file.
1
#ifndef __UTIL_FUNCTIONS_H__
2
#define __UTIL_FUNCTIONS_H__
3
4
5
namespace
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
EOUtils
Definition
StringUtils.cpp:6
EOUtils::maxValue
T maxValue()
Definition
utilFunctions.h:8
EOUtils::minValue
T minValue()
Definition
utilFunctions.h:19
Generated by
1.9.8