omdl  v1.0
OpenSCAD Mechanical Design Library
angle.scad File Reference

Angle units and conversions. More...

+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions and/or Modules

function angle_unit_name (u=angle_unit_default)
 Return the name of an angle unit identifier. More...
 
function angle (a, from=angle_unit_default, to=angle_unit_base)
 Convert an angle value from one unit to another. More...
 
function angle_inv (a, from=angle_unit_base, to=angle_unit_default)
 Convert an angle value from one unit to another (direction-swapped defaults). More...
 
Shorts

Convenience wrappers around angle that fix the from unit to a named unit. The to parameter defaults to angle_unit_base and may be overridden when a non-default target unit is needed. Use angle directly when the source unit is also non-default.

function a_deg (a, to=angle_unit_base)
 Shorthand angle conversion for degrees. More...
 
function a_rad (a, to=angle_unit_base)
 Shorthand angle conversion for radians. More...
 

Variables

 angle_unit_base = "d"
 
 angle_unit_default = "d"
 

File Details

Angle units and conversions.

Author
Roy Allen Sutton
Date
2015-2024

This file is part of omdl, an OpenSCAD mechanical design library.

The omdl is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version.

The omdl is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with the omdl; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA; or see http://www.gnu.org/licenses/.

Definition in file angle.scad.