summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--mathlib.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/mathlib.c b/mathlib.c
index d16eb596..eb148790 100644
--- a/mathlib.c
+++ b/mathlib.c
@@ -3,15 +3,17 @@
3** Mathematics library to LUA 3** Mathematics library to LUA
4*/ 4*/
5 5
6char *rcs_mathlib="$Id: $"; 6char *rcs_mathlib="$Id: mathlib.c,v 1.1 1993/12/17 18:41:19 celes Exp celes $";
7 7
8#include <stdio.h> /* NULL */ 8#include <stdio.h> /* NULL */
9#include <math.h> 9#include <math.h>
10 10
11#include "lualib.h"
11#include "lua.h" 12#include "lua.h"
12 13
13#define TODEGREE(a) ((a)*180.0/3.14159) 14#define PI (3.141592653589793)
14#define TORAD(a) ((a)*3.14159/180.0) 15#define TODEGREE(a) ((a)*180.0/PI)
16#define TORAD(a) ((a)*PI/180.0)
15 17
16static void math_abs (void) 18static void math_abs (void)
17{ 19{