Files
XCSDD/docs/api/math/h/rad-to-deg.md

21 lines
474 B
Markdown
Raw Normal View History

# Math::RAD_TO_DEG
```cpp
constexpr float RAD_TO_DEG = 180.0f / Math::PI;
```
`RAD_TO_DEG` 是弧度转角度的转换系数。1 弧度等于 `180 / PI` 度,约等于 57.29577951308232087685。使用该常量将弧度值乘以 `RAD_TO_DEG` 即可得到对应的角度值。
**示例:**
```cpp
#include <XCEngine/Math/Math.h>
float radians = Math::HALF_PI;
float degrees = radians * Math::RAD_TO_DEG;
```
## 相关文档
- [Math 总览](h.md) - 返回 Math 概览