Files
XCSDD/docs/api/math/h/radians.md

21 lines
488 B
Markdown
Raw Permalink Normal View History

# Math::Radians
```cpp
float Radians(float degrees);
```
`Radians` 函数将角度值转换为弧度值。转换公式为:`弧度 = 角度 * (PI / 180)`。该函数是 `Degrees` 函数的逆函数,常用于将 UI 输入的角度值或游戏中的角度值转换为三角函数所需的弧度值。
**示例:**
```cpp
#include <XCEngine/Math/Math.h>
float degrees = 90.0f;
float radians = Math::Radians(degrees);
```
## 相关文档
- [Math 总览](h.md) - 返回 Math 概览