novaphy.rad2deg¶
Convert an angle from radians to degrees.
Parameters¶
| Parameter | Description |
|---|---|
radians |
Input angle in radians. |
Returns¶
The angle expressed in degrees (radians * 180 / π).
Example¶
import math
import novaphy
assert math.isclose(novaphy.rad2deg(math.pi), 180.0)
assert math.isclose(novaphy.rad2deg(math.pi / 4), 45.0)
Notes¶
- Internally a thin wrapper around the C++
M_PIconstant; round-trips with deg2rad within float32 precision. - For NumPy arrays of angles, prefer
numpy.rad2deg; this helper accepts a single scalar.