Merge pull request #44 from rockstorm101/standardize

regular_shapes: rename reg_polygon
This commit is contained in:
Chow Loong Jin 2018-10-05 11:34:20 +08:00 committed by GitHub
commit 842f6bcb29
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -27,7 +27,15 @@ module triangle(radius)
polygon(points=[[-a,-o],[0,radius],[a,-o]],paths=[[0,1,2]]);
}
module reg_polygon(sides,radius)
module reg_polygon(sides, radius) {
echo("<font color='red'>
DEPRECATED: function 'reg_polygon' is now deprecated
please use 'regular_polygon' instead</font>");
regular_polygon(sides, radius);
}
module regular_polygon(sides, radius)
{
function dia(r) = sqrt(pow(r*2,2)/2); //sqrt((r*2^2)/2) if only we had an exponention op
if(sides<2) square([radius,0]);