Deg

Represents an angle in degrees.

Defined in Rodin/Math/Deg.h

class Deg;

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
Direct inheritance by class family
↓
Deg

Inherits from

Base classResponsibility
Unit<Deg, Real>public
Full type
Unit< Deg, Real >
Base class for units using CRTP.

Inherited interface

Declared inMembers
Unit
22 members

Public types

using Parent = Unit<Deg, Real>
Parent class type.

Public functions

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

Function documentation

Rad 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} $ .