1
0
mirror of https://github.com/JustinSDK/dotSCAD.git synced 2025-04-27 09:32:25 +02:00

add radians

This commit is contained in:
Justin Lin 2021-02-12 18:56:03 +08:00
parent fcb4afa93f
commit ac7711a827
3 changed files with 26 additions and 1 deletions

View File

@ -145,7 +145,7 @@ These examples incubate dotSCAD and dotSCAD refactors these examples. See [examp
- [util/lerp](https://openhome.cc/eGossip/OpenSCAD/lib3x-lerp.html)
- [util/parse_number](https://openhome.cc/eGossip/OpenSCAD/lib3x-parse_number.html)
- util/polar_coordinate
- util/radians
- [util/radians](https://openhome.cc/eGossip/OpenSCAD/lib3x-radians.html)
- [util/rand](https://openhome.cc/eGossip/OpenSCAD/lib3x-rand.html)
- [util/reverse](https://openhome.cc/eGossip/OpenSCAD/lib3x-reverse.html)
- [util/slice](https://openhome.cc/eGossip/OpenSCAD/lib3x-slice.html)

15
docs/lib3x-radians.md Normal file
View File

@ -0,0 +1,15 @@
# radian
Converts a degree measurement to the corresponding value in radians.
**Since:**: 3.0
## Parameters
- `degrees` : The degrees value.
## Examples
use <util/radians.scad>;
assert(radians(180) == PI);

View File

@ -1 +1,11 @@
/**
* radians.scad
*
* @copyright Justin Lin, 2020
* @license https://opensource.org/licenses/lgpl-3.0.html
*
* @see https://openhome.cc/eGossip/OpenSCAD/lib3x-radians.html
*
**/
function radians(degrees) = PI / 180 * degrees;