novaphy.deg2rad¶
Convert an angle from degrees to radians.
Parameters¶
| Parameter | Description |
|---|---|
deg |
Input angle in degrees. |
Returns¶
The angle expressed in radians (degrees * π / 180).
Example¶
import math
import novaphy
assert math.isclose(novaphy.deg2rad(180.0), math.pi, rel_tol=1.0e-6)
assert math.isclose(novaphy.deg2rad(-90.0), -math.pi / 2, rel_tol=1.0e-6)
Notes¶
- Use this helper when authoring URDF / MJCF-style angle inputs from Python literals.
- For NumPy arrays of angles, prefer
numpy.deg2rad; this helper accepts a single scalar.