From 13649d120231a74b6bc8a0cc51ba9e3254cea7d6 Mon Sep 17 00:00:00 2001 From: tnut Date: Sat, 19 Feb 2011 18:29:59 +0100 Subject: suppression du dossier test --- test/libofa/tnt_math_utils.h | 70 -------------------------------------------- 1 file changed, 70 deletions(-) delete mode 100644 test/libofa/tnt_math_utils.h (limited to 'test/libofa/tnt_math_utils.h') diff --git a/test/libofa/tnt_math_utils.h b/test/libofa/tnt_math_utils.h deleted file mode 100644 index 40de63f05..000000000 --- a/test/libofa/tnt_math_utils.h +++ /dev/null @@ -1,70 +0,0 @@ -#ifndef MATH_UTILS_H -#define MATH_UTILS_H - -#include -/* needed for sqrt() below */ - -#ifdef PREANSI -template -inline const _Tp& min(const _Tp& __a, const _Tp& __b) { - return __b < __a ? __b : __a; -} - -template -inline const _Tp& max(const _Tp& __a, const _Tp& __b) { - return __a < __b ? __b : __a; -} -#endif - - -namespace TNT -{ -/** - @returns the absolute value of a real (no-complex) scalar. -*/ -template -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 - sqrt(a*a + b*b). -*/ -template -Real hypot(const Real &a, const Real &b) -{ - - if (a== 0) - return abs(b); - else - { - Real c = b/a; - return a * sqrt(1 + c*c); - } -} - -/** - @returns the minimum of scalars a and b. -template -Scalar min(const Scalar &a, const Scalar &b) -{ - return a < b ? a : b; -} -*/ - -/** - @returns the maximum of scalars a and b. -template -Scalar max(const Scalar &a, const Scalar &b) -{ - return a > b ? a : b; -} -*/ - -} -#endif -/* MATH_UTILS_H */ -- cgit v1.2.3-54-g00ecf