commit e9e9cb03f0c8792cab3759deb9a66b21f6678d3d parent 0eb6ee3feec634134b823f300652075c218d16c1 Author: Waldemar Celes <celes@tecgraf.puc-rio.br> Date: Wed, 20 Jul 1994 19:12:08 -0300 Aumentar precisao do valor de PI. Diffstat:
M | mathlib.c | | | 8 | +++++--- |
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/mathlib.c b/mathlib.c @@ -3,15 +3,17 @@ ** Mathematics library to LUA */ -char *rcs_mathlib="$Id: $"; +char *rcs_mathlib="$Id: mathlib.c,v 1.1 1993/12/17 18:41:19 celes Exp celes $"; #include <stdio.h> /* NULL */ #include <math.h> +#include "lualib.h" #include "lua.h" -#define TODEGREE(a) ((a)*180.0/3.14159) -#define TORAD(a) ((a)*3.14159/180.0) +#define PI (3.141592653589793) +#define TODEGREE(a) ((a)*180.0/PI) +#define TORAD(a) ((a)*PI/180.0) static void math_abs (void) {