medfall

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs

commit f9f3a5f6bbd741bd336ae2057f8227f560db0ddf
parent 0ceca9e6a5c23e9fa8d13f9f640d15c83e1c8515
Author: Michael Savage <mikejsavage@gmail.com>
Date:   Tue Feb  2 19:42:45 +0000

Add abs template

Diffstat:
intrinsics.h | 5+++++
1 file changed, 5 insertions(+), 0 deletions(-)
diff --git a/intrinsics.h b/intrinsics.h @@ -51,6 +51,11 @@ T max( T a, T b ) { return a > b ? a : b; } +template< typename T > +T abs( T x ) { + return x > 0 ? x : -x; +} + #include "platform_backtrace.h" #ifdef assert