diff options
author | Waldemar Celes <celes@tecgraf.puc-rio.br> | 1994-07-20 19:12:27 -0300 |
---|---|---|
committer | Waldemar Celes <celes@tecgraf.puc-rio.br> | 1994-07-20 19:12:27 -0300 |
commit | e9e9cb03f0c8792cab3759deb9a66b21f6678d3d (patch) | |
tree | 4f6b975737c6ee083d6d68d232efb212c2dc4818 | |
parent | 0eb6ee3feec634134b823f300652075c218d16c1 (diff) | |
download | lua-e9e9cb03f0c8792cab3759deb9a66b21f6678d3d.tar.gz lua-e9e9cb03f0c8792cab3759deb9a66b21f6678d3d.tar.bz2 lua-e9e9cb03f0c8792cab3759deb9a66b21f6678d3d.zip |
Aumentar precisao do valor de PI.
-rw-r--r-- | mathlib.c | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -3,15 +3,17 @@ | |||
3 | ** Mathematics library to LUA | 3 | ** Mathematics library to LUA |
4 | */ | 4 | */ |
5 | 5 | ||
6 | char *rcs_mathlib="$Id: $"; | 6 | char *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 | ||
16 | static void math_abs (void) | 18 | static void math_abs (void) |
17 | { | 19 | { |