RLLib  0.1
Public Member Functions | Public Attributes | List of all members
rl::Angle Struct Reference

Class representing an angle in radian. More...

#include <Angle.hpp>

Public Member Functions

constexpr Angle (float a) noexcept
 Creates an angle. More...
 
constexpr operator float () const noexcept
 Casts the angle into a floating point value. More...
 
constexpr operator float & () noexcept
 Returns a reference to the angle as a floating point value. More...
 

Public Attributes

float angle = 0
 The angle in radians.
 

Detailed Description

Class representing an angle in radian.

rl::Angle a = 1,5708; // constructs an angle in radian
rl::Angle b = 90_deg; // constructs an angle in degrees

Constructor & Destructor Documentation

◆ Angle()

constexpr rl::Angle::Angle ( float  a)
noexcept

Creates an angle.

Parameters
aThe angle in radians

Member Function Documentation

◆ operator float()

constexpr rl::Angle::operator float ( ) const
noexcept

Casts the angle into a floating point value.

Returns
The angle in radians

◆ operator float &()

constexpr rl::Angle::operator float & ( )
noexcept

Returns a reference to the angle as a floating point value.

Returns
A reference to the angle in radians

The documentation for this struct was generated from the following file: