summaryrefslogtreecommitdiff
path: root/components
diff options
context:
space:
mode:
authorGrissiom <[email protected]>2013-01-09 21:37:41 +0800
committerGrissiom <[email protected]>2013-01-09 21:37:41 +0800
commit1bb22a0a0b77370499a680a1fa4c964e1a10909b (patch)
treec9edafbd330a65a53d3201da369c33b0c5b846fc /components
parentaccace98e05eda28c116eb04502eb92d01b6ef1e (diff)
fix math.h
Declare sin/cos and M_PI in math.h.
Diffstat (limited to 'components')
-rw-r--r--components/libc/minilibc/math.c1
-rw-r--r--components/libc/minilibc/math.h9
2 files changed, 7 insertions, 3 deletions
diff --git a/components/libc/minilibc/math.c b/components/libc/minilibc/math.c
index bcba6051a8..27315a428c 100644
--- a/components/libc/minilibc/math.c
+++ b/components/libc/minilibc/math.c
@@ -9,7 +9,6 @@
*/
#define PRECISION 9
-#define M_PI 3.141592653589793238462643
static double cos_off_tbl[] = {0.0, -M_PI/2., 0, -M_PI/2.};
static double cos_sign_tbl[] = {1,-1,-1,1};
diff --git a/components/libc/minilibc/math.h b/components/libc/minilibc/math.h
index e2ce6f8e71..b436eb08b5 100644
--- a/components/libc/minilibc/math.h
+++ b/components/libc/minilibc/math.h
@@ -1,4 +1,9 @@
-#ifndef __STDIO_H__
-#define __STDIO_H__
+#ifndef __MATH_H__
+#define __MATH_H__
+
+#define M_PI 3.141592653589793238462643
+
+double sin(double x);
+double cos(double x);
#endif