2021-10-17 18:26:00 +02:00
|
|
|
---
|
2022-10-01 22:20:43 +02:00
|
|
|
title: utils.deg2rad()
|
2021-10-17 18:26:00 +02:00
|
|
|
---
|
2021-08-25 16:09:31 +02:00
|
|
|
|
2022-10-01 22:20:43 +02:00
|
|
|
The `utils.deg2read()` function returns the degrees you pass to it as radians.
|
|
|
|
|
|
|
|
## Signature
|
|
|
|
|
2021-08-25 16:09:31 +02:00
|
|
|
```js
|
|
|
|
float deg2rad(float degrees)
|
|
|
|
```
|
|
|
|
|
2022-10-01 22:20:43 +02:00
|
|
|
## Notes
|
2021-08-25 16:09:31 +02:00
|
|
|
|
2022-10-01 22:20:43 +02:00
|
|
|
This is useful for when you use functions like `Math.cos()` that expect a corner
|
2021-08-25 16:09:31 +02:00
|
|
|
in radians, when we typically use degrees.
|