Skip to content

novaphy.rad2deg

Convert an angle from radians to degrees.

def rad2deg(radians: float) -> float

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_PI constant; round-trips with deg2rad within float32 precision.
  • For NumPy arrays of angles, prefer numpy.rad2deg; this helper accepts a single scalar.

See Also