Travis build: 163

This commit is contained in:
30secondsofcode
2019-10-15 12:18:50 +00:00
parent 1daa49bea6
commit 7b2bb16a04
3 changed files with 59 additions and 0 deletions

View File

@ -81,6 +81,7 @@
* [`average`](#average)
* [`average_by`](#average_by)
* [`clamp_number`](#clamp_number)
* [`degrees_to_rads`](#degrees_to_rads)
* [`digitize`](#digitize)
* [`factorial`](#factorial)
* [`fibonacci`](#fibonacci)
@ -1269,6 +1270,29 @@ clamp_number(1, -1, -5) # -1
<br>[⬆ Back to top](#contents)
### degrees_to_rads
Converts an angle from degrees to radians.
Use `math.pi` and the degrees to radians formula to convert the angle from degrees to radians.
```py
import math
def degrees_to_rads(deg):
return (deg * math.pi) / 180.0
```
<details>
<summary>Examples</summary>
```py
degrees_to_rads(180) # 3.141592653589793
```
</details>
<br>[⬆ Back to top](#contents)
### digitize
Converts a number to an array of digits.

View File

@ -277,6 +277,21 @@
"hash": "a100d5704afe48a7dce26871bc50c993670d7388d8e4958c02c07efe07884167"
}
},
{
"id": "degrees_to_rads",
"type": "snippetListing",
"title": "degrees_to_rads",
"attributes": {
"text": "Converts an angle from degrees to radians.\n\nUse `math.pi` and the degrees to radians formula to convert the angle from degrees to radians.\n\n",
"tags": [
"math",
"beginner"
]
},
"meta": {
"hash": "8bb6f1b7cde2b4602449ee30a7c7e402d25e6bb6a7841472d87b7fcbe5eab7f3"
}
},
{
"id": "difference",
"type": "snippetListing",

View File

@ -367,6 +367,26 @@
"hash": "a100d5704afe48a7dce26871bc50c993670d7388d8e4958c02c07efe07884167"
}
},
{
"id": "degrees_to_rads",
"title": "degrees_to_rads",
"type": "snippet",
"attributes": {
"fileName": "degrees_to_rads.md",
"text": "Converts an angle from degrees to radians.\n\nUse `math.pi` and the degrees to radians formula to convert the angle from degrees to radians.\n\n",
"codeBlocks": {
"code": "import math\n\ndef degrees_to_rads(deg):\n return (deg * math.pi) / 180.0",
"example": "degrees_to_rads(180) # 3.141592653589793"
},
"tags": [
"math",
"beginner"
]
},
"meta": {
"hash": "8bb6f1b7cde2b4602449ee30a7c7e402d25e6bb6a7841472d87b7fcbe5eab7f3"
}
},
{
"id": "difference",
"title": "difference",