mirror of
https://github.com/JustinSDK/dotSCAD.git
synced 2025-04-27 09:32:25 +02:00
add radians
This commit is contained in:
parent
fcb4afa93f
commit
ac7711a827
@ -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
15
docs/lib3x-radians.md
Normal 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);
|
@ -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;
|
Loading…
x
Reference in New Issue
Block a user