Rodin::Math::Deg class

Represents an angle in degrees.

This class provides a type-safe wrapper for angles measured in degrees, inheriting all the unit arithmetic operations from the Unit base class. Provides a conversion method to radians.

Example Usage

Deg angle(180.0);  // 180 degrees
Rad radians = angle.toRad();  // π radians

Base classes

template<class Derived, class T>
class Unit<Deg, Real>
Base class for units using CRTP.

Public functions

auto toRad() const -> Rad
Converts the angle from degrees to radians.

Function documentation

Rad Rodin::Math::Deg::toRad() const

Converts the angle from degrees to radians.

Returns The angle in radians

Applies the conversion $ \text{rad} = \text{deg} \times \frac{\pi}{180} $ .