Provide a fallback version of the libm function trunc

This fixes compilation on DOS.

Signed-off-by: Martin Storsjö <martin@martin.st>
This commit is contained in:
Martin Storsjö
2011-04-21 13:02:38 +02:00
parent 32a128522a
commit 23d3931a6a
2 changed files with 9 additions and 0 deletions

View File

@@ -86,6 +86,13 @@ static av_always_inline av_const float roundf(float x)
}
#endif /* HAVE_ROUNDF */
#if !HAVE_TRUNC
static av_always_inline av_const double trunc(double x)
{
return (x > 0) ? floor(x) : ceil(x);
}
#endif /* HAVE_TRUNC */
#if !HAVE_TRUNCF
static av_always_inline av_const float truncf(float x)
{