summaryrefslogtreecommitdiffstats
path: root/test/libofa/tnt_math_utils.h
diff options
context:
space:
mode:
authortnut <thierryn1 at hispeed dot ch>2011-02-19 18:29:59 +0100
committertnut <thierryn1 at hispeed dot ch>2011-02-19 18:29:59 +0100
commit13649d120231a74b6bc8a0cc51ba9e3254cea7d6 (patch)
tree1a83bfe8170c1c9283f3d73d704156dc89cd8ff3 /test/libofa/tnt_math_utils.h
parentaa8dbf45cd553b0f62c62c5c5fb4d51d17f03304 (diff)
downloadnutyx-extra-13649d120231a74b6bc8a0cc51ba9e3254cea7d6.tar.gz
nutyx-extra-13649d120231a74b6bc8a0cc51ba9e3254cea7d6.tar.bz2
nutyx-extra-13649d120231a74b6bc8a0cc51ba9e3254cea7d6.tar.xz
nutyx-extra-13649d120231a74b6bc8a0cc51ba9e3254cea7d6.zip
suppression du dossier test
Diffstat (limited to 'test/libofa/tnt_math_utils.h')
-rw-r--r--test/libofa/tnt_math_utils.h70
1 files changed, 0 insertions, 70 deletions
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 <math.h>
-/* needed for sqrt() below */
-
-#ifdef PREANSI
-template <class _Tp>
-inline const _Tp& min(const _Tp& __a, const _Tp& __b) {
- return __b < __a ? __b : __a;
-}
-
-template <class _Tp>
-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 <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
- sqrt(a*a + b*b).
-*/
-template <class Real>
-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 <class Scalar>
-Scalar min(const Scalar &a, const Scalar &b)
-{
- return a < b ? a : b;
-}
-*/
-
-/**
- @returns the maximum of scalars a and b.
-template <class Scalar>
-Scalar max(const Scalar &a, const Scalar &b)
-{
- return a > b ? a : b;
-}
-*/
-
-}
-#endif
-/* MATH_UTILS_H */