compile.patch 667 B

123456789101112131415161718192021222324252627282930313233343536
  1. --- lib/JAMA/tnt_math_utils.h 2006-05-10 20:58:50.000000000 +0300
  2. +++ lib/JAMA/tnt_math_utils.h 2007-07-27 16:20:01.000000000 +0300
  3. @@ -19,6 +19,16 @@
  4. namespace TNT
  5. {
  6. +
  7. +/**
  8. +· @returns the absolute value of a real (no-complex) scalar.
  9. +*/
  10. +template <class Real>
  11. +Real abs(const Real &a)
  12. +{
  13. + return (a > 0 ? a : -a);
  14. +}
  15. +
  16. /**
  17. @returns hypotenuse of real (non-complex) scalars a and b by
  18. avoiding underflow/overflow
  19. @@ -56,15 +66,6 @@
  20. }
  21. */
  22. -/**
  23. - @returns the absolute value of a real (no-complex) scalar.
  24. -*/
  25. -template <class Real>
  26. -Real abs(const Real &a)
  27. -{
  28. - return (a > 0 ? a : -a);
  29. -}
  30. -
  31. }
  32. #endif
  33. /* MATH_UTILS_H */