File: 01_gcc41.diff

package info (click to toggle)
libofa 0.9.3-25
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 2,092 kB
  • sloc: cpp: 24,487; sh: 8,366; makefile: 48; ansic: 14
file content (39 lines) | stat: -rw-r--r-- 983 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
Description: fix building over GCC 4.1.
Author: Lukáš Lalinský <lalinsky@gmail.com>
Last-Update: 2006-07-23
Index: libofa-0.9.3/lib/JAMA/tnt_math_utils.h
===================================================================
--- libofa-0.9.3.orig/lib/JAMA/tnt_math_utils.h
+++ libofa-0.9.3/lib/JAMA/tnt_math_utils.h
@@ -20,6 +20,15 @@ inline const _Tp& max(const _Tp& __a, co
 namespace TNT
 {
 /**
+	@returns the absolute value of a real (no-complex) scalar.
+*/
+template <class Real>
+Real abs(const Real &a)
+{
+	return  (a > 0 ? a : -a);
+}
+
+/**
 	@returns hypotenuse of real (non-complex) scalars a and b by 
 	avoiding underflow/overflow
 	using (a * sqrt( 1 + (b/a) * (b/a))), rather than
@@ -56,15 +65,6 @@ Scalar max(const Scalar &a, const Scalar
 }
 */
 
-/**
-	@returns the absolute value of a real (no-complex) scalar.
-*/
-template <class Real>
-Real abs(const Real &a)
-{
-	return  (a > 0 ? a : -a);
-}
-
 }
 #endif
 /* MATH_UTILS_H */