181 ) = u ==
"r" ?
"radian"
182 : u ==
"d" ?
"degree"
183 : u ==
"dms" ?
"degree, minute, second"
203 function _angle_unit_d2
207 ) = to ==
"r" ? (a *
tau / 360)
214 sign = (a < 0) ? -1 : 1,
217 min = floor((aa - deg) * 60),
218 sec = (aa - deg - min/60) * 3600
220 [ sign * deg, min, sec ]
239 function _angle_unit_2d
243 ) = from ==
"r" ? (a * 360 /
tau)
248 let( sign = (a[0] < 0) ? -1 : 1, adeg = abs(a[0]) )
249 sign * (adeg + a[1]/60 + a[2]/3600)
273 : let( d = _angle_unit_2d( a, from ) )
277 : _angle_unit_d2( d, to );
302 ) =
angle(a=a, from=from, to=to);
tau
<decimal> The ratio of a circle's circumference to its radius.
function angle(a, from=angle_unit_default, to=angle_unit_base)
Convert an angle value from one unit to another.
function a_rad(a, to=angle_unit_base)
Shorthand angle conversion for radians.
function angle_unit_name(u=angle_unit_default)
Return the name of an angle unit identifier.
function a_deg(a, to=angle_unit_base)
Shorthand angle conversion for degrees.
function angle_inv(a, from=angle_unit_base, to=angle_unit_default)
Convert an angle value from one unit to another (direction-swapped defaults).