#define floor floorf , if it exists. Don't use floorf() directly.
authorSegher Boessenkool <segher@xiph.org>
Mon, 18 Mar 2002 03:30:23 +0000 (03:30 +0000)
committerSegher Boessenkool <segher@xiph.org>
Mon, 18 Mar 2002 03:30:23 +0000 (03:30 +0000)
svn path=/trunk/vorbis/; revision=3156

lib/os.h
lib/psy.c

index a6d179e..aae1da7 100644 (file)
--- a/lib/os.h
+++ b/lib/os.h
@@ -13,7 +13,7 @@
  ********************************************************************
 
  function: #ifdef jail to whip a few platforms into the UNIX ideal.
- last mod: $Id: os.h,v 1.28 2001/12/19 01:08:14 xiphmont Exp $
+ last mod: $Id: os.h,v 1.29 2002/03/18 03:30:23 segher Exp $
 
  ********************************************************************/
 
@@ -63,6 +63,9 @@
 #ifdef HAVE_RINTF
 #  define rint rintf
 #endif
+#ifdef HAVE_FLOORF
+#  define floor floorf
+#endif
 
 #ifndef FAST_HYPOT
 #  define FAST_HYPOT hypot
index 22d283c..8a41dc9 100644 (file)
--- a/lib/psy.c
+++ b/lib/psy.c
@@ -11,7 +11,7 @@
  ********************************************************************
 
  function: psychoacoustics not including preecho
- last mod: $Id: psy.c,v 1.65 2002/03/17 19:50:47 xiphmont Exp $
+ last mod: $Id: psy.c,v 1.66 2002/03/18 03:30:23 segher Exp $
 
  ********************************************************************/
 
@@ -923,7 +923,7 @@ static void couple_point(float A, float B, float fA, float fB,
     }
     
     corr=origmag/FAST_HYPOT(fA,fB);
-    *mag=unitnorm(*mag)*floorf(corr*igranule+.5f)*granule; 
+    *mag=unitnorm(*mag)*floor(corr*igranule+.5f)*granule; 
     *ang=0.f;
 
   }else{