summaryrefslogtreecommitdiffstats
path: root/libdimension/dimension
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@gmail.com>2010-09-30 12:17:03 -0400
committerTavian Barnes <tavianator@gmail.com>2010-09-30 12:27:11 -0400
commit93619cc41c1fc49ab0696993ee93e6ada5951a6d (patch)
tree87ea38fc307d851ef4220da55fe47b1087d4135a /libdimension/dimension
parent9666ad922524b617947590aed4c6fde5febab53a (diff)
downloaddimension-93619cc41c1fc49ab0696993ee93e6ada5951a6d.tar.xz
Don't assume M_PI will be defined.
Diffstat (limited to 'libdimension/dimension')
-rw-r--r--libdimension/dimension/geometry.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/libdimension/dimension/geometry.h b/libdimension/dimension/geometry.h
index 42a9985..c90c3c8 100644
--- a/libdimension/dimension/geometry.h
+++ b/libdimension/dimension/geometry.h
@@ -87,13 +87,13 @@ dmnsn_max(double a, double b)
DMNSN_INLINE double
dmnsn_radians(double degrees)
{
- return degrees*M_PI/180.0;
+ return degrees*atan(1.0)/45.0;
}
DMNSN_INLINE double
dmnsn_degrees(double radians)
{
- return radians*180.0/M_PI;
+ return radians*45.0/atan(1.0);
}
/* Shorthand for vector/matrix construction */