From 93619cc41c1fc49ab0696993ee93e6ada5951a6d Mon Sep 17 00:00:00 2001 From: Tavian Barnes Date: Thu, 30 Sep 2010 12:17:03 -0400 Subject: Don't assume M_PI will be defined. --- libdimension/dimension/geometry.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'libdimension/dimension/geometry.h') 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 */ -- cgit v1.2.3