]> git.pld-linux.org Git - packages/OpenNI.git/blob - OpenNI-c++.patch
- unconditional noarch subpackages
[packages/OpenNI.git] / OpenNI-c++.patch
1 --- OpenNI-OpenNI-1e9524f/Samples/NiViewer/glh/glh_linear.h.orig        2013-11-12 17:30:03.000000000 +0100
2 +++ OpenNI-OpenNI-1e9524f/Samples/NiViewer/glh/glh_linear.h     2017-11-29 16:09:12.957112371 +0100
3 @@ -77,7 +77,7 @@
4  #define     GLH_EPSILON         GLH_REAL(10e-6)\r
5  #define     GLH_PI              GLH_REAL(3.1415926535897932384626433832795)    \r
6  \r
7 -#define     equivalent(a,b)     (((a < b + GLH_EPSILON) && (a > b - GLH_EPSILON)) ? true : false)\r
8 +#define     glh_equivalent(a,b)     (((a < b + GLH_EPSILON) && (a > b - GLH_EPSILON)) ? true : false)\r
9  \r
10  namespace glh\r
11  {\r
12 @@ -1093,7 +1093,7 @@
13  \r
14          real norm = q[0] * q[0] + q[1] * q[1] + q[2] * q[2] + q[3] * q[3];\r
15  \r
16 -        s = (equivalent(norm,GLH_ZERO)) ? GLH_ZERO : ( GLH_TWO / norm );\r
17 +        s = (glh_equivalent(norm,GLH_ZERO)) ? GLH_ZERO : ( GLH_TWO / norm );\r
18  \r
19          xs = q[0] * s;\r
20          ys = q[1] * s;\r
21 @@ -1194,7 +1194,7 @@
22              theta *= real(0.5);\r
23              real sin_theta = real(sin(theta));\r
24  \r
25 -            if (!equivalent(sqnorm,GLH_ONE)) \r
26 +            if (!glh_equivalent(sqnorm,GLH_ONE)) \r
27                sin_theta /= real(sqrt(sqnorm));\r
28              x = sin_theta * axis.v[0];\r
29              y = sin_theta * axis.v[1];\r
30 @@ -1216,14 +1216,14 @@
31  \r
32          alpha = p1.dot(p2);\r
33  \r
34 -        if(equivalent(alpha,GLH_ONE))\r
35 +        if(glh_equivalent(alpha,GLH_ONE))\r
36          { \r
37              *this = identity(); \r
38              return *this; \r
39          }\r
40  \r
41          // ensures that the anti-parallel case leads to a positive dot\r
42 -        if(equivalent(alpha,-GLH_ONE))\r
43 +        if(glh_equivalent(alpha,-GLH_ONE))\r
44          {\r
45              vec3 v;\r
46  \r
47 @@ -1280,7 +1280,7 @@
48      void normalize()\r
49      {\r
50          real rnorm = GLH_ONE / real(sqrt(w * w + x * x + y * y + z * z));\r
51 -        if (equivalent(rnorm, GLH_ZERO))\r
52 +        if (glh_equivalent(rnorm, GLH_ZERO))\r
53              return;\r
54          x *= rnorm;\r
55          y *= rnorm;\r
56 @@ -1439,10 +1439,10 @@
57      inline\r
58      bool operator == ( const quaternion & q1, const quaternion & q2 )\r
59      {\r
60 -        return (equivalent(q1.x, q2.x) &&\r
61 -                       equivalent(q1.y, q2.y) &&\r
62 -                       equivalent(q1.z, q2.z) &&\r
63 -                       equivalent(q1.w, q2.w) );\r
64 +        return (glh_equivalent(q1.x, q2.x) &&\r
65 +                       glh_equivalent(q1.y, q2.y) &&\r
66 +                       glh_equivalent(q1.z, q2.z) &&\r
67 +                       glh_equivalent(q1.w, q2.w) );\r
68      }\r
69  \r
70      inline\r
This page took 0.063561 seconds and 3 git commands to generate.