aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2002-08-14 17:07:43 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2002-08-14 17:07:43 -0300
commit653416d5c06d54f8e75603f32043d328ba902b9c (patch)
tree07a8764b24fa8bfe320ac07683b2e1f8598721a5
parent82a3be0671fd222dd53cab00183e473acb5e322f (diff)
downloadlua-653416d5c06d54f8e75603f32043d328ba902b9c.tar.gz
lua-653416d5c06d54f8e75603f32043d328ba902b9c.tar.bz2
lua-653416d5c06d54f8e75603f32043d328ba902b9c.zip
angles in radians(!)
-rw-r--r--lmathlib.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/lmathlib.c b/lmathlib.c
index 435eeda5..0e9860ee 100644
--- a/lmathlib.c
+++ b/lmathlib.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lmathlib.c,v 1.48 2002/06/24 13:54:13 roberto Exp roberto $ 2** $Id: lmathlib.c,v 1.49 2002/08/07 20:54:38 roberto Exp roberto $
3** Standard mathematical library 3** Standard mathematical library
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -21,15 +21,15 @@
21 21
22 22
23/* 23/*
24** If you want Lua to operate in radians (instead of degrees), 24** If you want Lua to operate in degrees (instead of radians),
25** define RADIANS 25** define DEGREES
26*/ 26*/
27#ifdef RADIANS 27#ifdef DEGREES
28#define FROMRAD(a) (a)
29#define TORAD(a) (a)
30#else
31#define FROMRAD(a) ((a)/RADIANS_PER_DEGREE) 28#define FROMRAD(a) ((a)/RADIANS_PER_DEGREE)
32#define TORAD(a) ((a)*RADIANS_PER_DEGREE) 29#define TORAD(a) ((a)*RADIANS_PER_DEGREE)
30#else
31#define FROMRAD(a) (a)
32#define TORAD(a) (a)
33#endif 33#endif
34 34
35 35