gnash-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gnash-commit] gnash/libbase utility.h


From: Markus Gothe
Subject: [Gnash-commit] gnash/libbase utility.h
Date: Sun, 02 Sep 2007 00:08:59 +0000

CVSROOT:        /sources/gnash
Module name:    gnash
Changes by:     Markus Gothe <nihilus>  07/09/02 00:08:59

Modified files:
        libbase        : utility.h 

Log message:
        Re-added fmin()/fmax() and a note on this being C99.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/libbase/utility.h?cvsroot=gnash&r1=1.34&r2=1.35

Patches:
Index: utility.h
===================================================================
RCS file: /sources/gnash/gnash/libbase/utility.h,v
retrieving revision 1.34
retrieving revision 1.35
diff -u -b -r1.34 -r1.35
--- utility.h   29 Aug 2007 23:19:45 -0000      1.34
+++ utility.h   2 Sep 2007 00:08:58 -0000       1.35
@@ -92,6 +92,10 @@
 //
 
 inline float infinite_to_fzero(float x) {      return isfinite(x) ? x : 0.0f; }
+inline int     iabs(int i) { if (i < 0) return -i; else return i; }
+/* fmax()/fmin() is C99 */
+inline float   fmax(float a, float b) { if (a < b) return b; else return a; }
+inline float   fmin(float a, float b) { if (a < b) return a; else return b; }
 inline int     imax(int a, int b) { if (a < b) return b; else return a; }
 inline int     imin(int a, int b) { if (a < b) return a; else return b; }
 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]