35 include <constants.scad>;
87 ) = units ==
"r" ?
"radian"
88 : units ==
"d" ?
"degree"
89 : units ==
"dms" ?
"degree, minute, second"
102 function unit_angle_d_to
106 ) = to ==
"r" ? ( angle *
tau / 360 )
107 : to ==
"d" ? ( angle )
108 : to ==
"dms" ? ( [ floor(angle),
109 floor( ( angle - floor(angle) ) * 60 ),
112 - floor( ( angle - floor(angle) ) * 60 ) / 60 ) * 3600
126 function unit_angle_to_d
130 ) = from ==
"r" ? ( angle * 360 /
tau )
131 : from ==
"d" ? ( angle )
132 : from ==
"dms" ? ( angle[0] + angle[1]/60 + angle[2]/3600 )
150 ) = unit_angle_d_to( unit_angle_to_d( angle, from ), to );
tau
The ratio of a circle's circumference to its radius
base_unit_angle
Base unit for angle measurements.
function unit_angle_name(units=base_unit_angle)
Return the name of the given angle unit identifier.
function convert_angle(angle, from=base_unit_angle, to=base_unit_angle)
Convert the angle from from units to to units.