changeset 600:198d4fd6541d libavutil

Add truncf() replacement function. Patch by Michael Kostylev <mik at it-1 dot ru>
author ramiro
date Sun, 11 Jan 2009 22:10:04 +0000
parents 49da89abe282
children b150276ce746
files internal.h
diffstat 1 files changed, 7 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/internal.h	Sun Jan 11 21:03:42 2009 +0000
+++ b/internal.h	Sun Jan 11 22:10:04 2009 +0000
@@ -294,4 +294,11 @@
 }
 #endif /* HAVE_ROUNDF */
 
+#ifndef HAVE_TRUNCF
+static av_always_inline av_const float truncf(float x)
+{
+    return (x > 0) ? floor(x) : ceil(x);
+}
+#endif /* HAVE_TRUNCF */
+
 #endif /* AVUTIL_INTERNAL_H */