From fd06f8e6489a18449f54b62ad864fd4d49ac609a Mon Sep 17 00:00:00 2001 From: Elmom Date: Sun, 25 Jul 2010 17:31:35 +0300 Subject: [PATCH] Added constants.scad to house all mathematical contants, and added deg(angle) to math.scad --- constants.scad | 6 ++++++ math.scad | 6 +++--- 2 files changed, 9 insertions(+), 3 deletions(-) create mode 100644 constants.scad diff --git a/constants.scad b/constants.scad new file mode 100644 index 0000000..1ad2992 --- /dev/null +++ b/constants.scad @@ -0,0 +1,6 @@ +TAU = 6.2831853071; //2*PI, see http://tauday.com/ +PI = TAU/2; + +// translates a imperial measurement in inches to meters +mm_per_inch = 25.4; + diff --git a/math.scad b/math.scad index ca1f211..19c3dd9 100644 --- a/math.scad +++ b/math.scad @@ -1,4 +1,4 @@ -PI = 3.14159; +include + +function deg(angle) = 360*angle/TAU; -// translates a imperial measurement in inches to meters -mm_per_inche =25.4;