changeset 2769:2a46b5912665

Added missing math.h functionality for SDL_audiocvt.c
author Sam Lantinga <slouken@libsdl.org>
date Sun, 12 Oct 2008 16:30:42 +0000
parents 26861c61142a
children c3ff3d5d16f0
files src/libm/math.h
diffstat 1 files changed, 5 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/libm/math.h	Sun Oct 12 16:21:36 2008 +0000
+++ b/src/libm/math.h	Sun Oct 12 16:30:42 2008 +0000
@@ -28,6 +28,8 @@
 
 /* Math routines from uClibc: http://www.uclibc.org */
 
+#define M_PI    3.14159265358979323846264338327950288   /* pi */
+
 extern double __ieee754_log(double x);
 extern double __ieee754_pow(double x, double y);
 extern double __ieee754_sqrt(double x);
@@ -43,6 +45,9 @@
 extern double scalbn(double x, int n);
 extern double sin(double x);
 
+#define sinf(x) (float)sin((double)x)
+#define cosf(x) (float)cos((double)x)
+
 #endif /* HAVE_MATH_H */
 
 /* vi: set ts=4 sw=4 expandtab: */