summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--apps/plugins/calculator.c3
-rw-r--r--apps/plugins/lua/rockconf.h7
-rw-r--r--firmware/libc/include/math.h (renamed from firmware/include/math.h)1
3 files changed, 8 insertions, 3 deletions
diff --git a/apps/plugins/calculator.c b/apps/plugins/calculator.c
index c19d6bb..95b35e9 100644
--- a/apps/plugins/calculator.c
+++ b/apps/plugins/calculator.c
@@ -80,6 +80,9 @@ F3: equal to "="
PLUGIN_HEADER
+
+#define M_TWOPI (M_PI * 2.0)
+
#define BUTTON_ROWS 5
#define BUTTON_COLS 5
diff --git a/apps/plugins/lua/rockconf.h b/apps/plugins/lua/rockconf.h
index 92c0f8c..7fbc89f 100644
--- a/apps/plugins/lua/rockconf.h
+++ b/apps/plugins/lua/rockconf.h
@@ -51,8 +51,11 @@ struct tm *gmtime(const time_t *timep);
long strtol(const char *nptr, char **endptr, int base);
unsigned long strtoul(const char *str, char **endptr, int base);
size_t strftime(char* dst, size_t max, const char* format, const struct tm* tm);
-long floor(long x);
-long pow(long x, long y);
+long lfloor(long x);
+long lpow(long x, long y);
+
+#define floor lfloor
+#define pow lpow
/* Simple substitutions */
#define realloc dlrealloc
diff --git a/firmware/include/math.h b/firmware/libc/include/math.h
index 5415e43..07f1f2d 100644
--- a/firmware/include/math.h
+++ b/firmware/libc/include/math.h
@@ -29,7 +29,6 @@ extern "C" {
#define M_LN2 0.69314718055994530942
#define M_LN10 2.30258509299404568402
#define M_PI 3.14159265358979323846
-#define M_TWOPI (M_PI * 2.0)
#define M_PI_2 1.57079632679489661923
#define M_PI_4 0.78539816339744830962
#define M_3PI_4 2.3561944901923448370E0