ReactOS
0.4.16-dev-1-gcf26321
math_aux.h
Go to the documentation of this file.
1
#ifndef __MATH_AUX_H
2
#define __MATH_AUX_H
3
4
#include <limits>
5
6
#undef __STD
7
#if !defined (STLPORT) || defined (_STLP_USE_NAMESPACES)
8
# define __STD std::
9
#else
10
# define __STD
11
#endif
12
13
/*
14
* This function is not only used to compare floating point values with a tolerance,
15
* it also leads to ambiguity problems if the called functions do not have the
16
* right prototype.
17
*/
18
template
<
class
_Tp>
19
bool
are_equals
(_Tp
val
, _Tp
ref
) {
20
if
(
val
<
ref
) {
21
return
(
ref
-
val
) <=
__STD
numeric_limits<_Tp>::epsilon
();
22
}
23
else
{
24
return
(
val
-
ref
) <=
__STD
numeric_limits<_Tp>::epsilon
();
25
}
26
}
27
28
#undef __STD
29
30
#endif
// __MATH_AUX_H
numeric_limits
Definition:
_limits.h:192
val
GLuint GLfloat * val
Definition:
glext.h:7180
__STD
#define __STD
Definition:
math_aux.h:8
are_equals
bool are_equals(_Tp val, _Tp ref)
Definition:
math_aux.h:19
ref
Definition:
send.c:48
sdk
lib
3rdparty
stlport
test
unit
math_aux.h
Generated on Wed Sep 11 2024 06:13:00 for ReactOS by
1.9.6