@@ -20,7 +20,7 @@ namespace omath
2020 class Angle
2121 {
2222 Type m_angle;
23- constexpr explicit Angle (const Type& degrees)
23+ constexpr explicit Angle (const Type& degrees) noexcept
2424 {
2525 if constexpr (flags == AngleFlags::Normalized)
2626 m_angle = angles::wrap_angle (degrees, min, max);
@@ -36,68 +36,68 @@ namespace omath
3636
3737 public:
3838 [[nodiscard]]
39- constexpr static Angle from_degrees (const Type& degrees)
39+ constexpr static Angle from_degrees (const Type& degrees) noexcept
4040 {
4141 return Angle{degrees};
4242 }
43- constexpr Angle (): m_angle(0 )
43+ constexpr Angle () noexcept : m_angle(0 )
4444 {
4545 }
4646 [[nodiscard]]
47- constexpr static Angle from_radians (const Type& degrees)
47+ constexpr static Angle from_radians (const Type& degrees) noexcept
4848 {
4949 return Angle{angles::radians_to_degrees<Type>(degrees)};
5050 }
5151
5252 [[nodiscard]]
53- constexpr const Type& operator *() const
53+ constexpr const Type& operator *() const noexcept
5454 {
5555 return m_angle;
5656 }
5757
5858 [[nodiscard]]
59- constexpr Type as_degrees () const
59+ constexpr Type as_degrees () const noexcept
6060 {
6161 return m_angle;
6262 }
6363
6464 [[nodiscard]]
65- constexpr Type as_radians () const
65+ constexpr Type as_radians () const noexcept
6666 {
6767 return angles::degrees_to_radians (m_angle);
6868 }
6969
7070 [[nodiscard]]
71- Type sin () const
71+ Type sin () const noexcept
7272 {
7373 return std::sin (as_radians ());
7474 }
7575
7676 [[nodiscard]]
77- Type cos () const
77+ Type cos () const noexcept
7878 {
7979 return std::cos (as_radians ());
8080 }
8181
8282 [[nodiscard]]
83- Type tan () const
83+ Type tan () const noexcept
8484 {
8585 return std::tan (as_radians ());
8686 }
8787
8888 [[nodiscard]]
89- Type atan () const
89+ Type atan () const noexcept
9090 {
9191 return std::atan (as_radians ());
9292 }
9393
9494 [[nodiscard]]
95- Type cot () const
95+ Type cot () const noexcept
9696 {
9797 return cos () / sin ();
9898 }
9999
100- constexpr Angle& operator +=(const Angle& other)
100+ constexpr Angle& operator +=(const Angle& other) noexcept
101101 {
102102 if constexpr (flags == AngleFlags::Normalized)
103103 m_angle = angles::wrap_angle (m_angle + other.m_angle , min, max);
@@ -114,15 +114,15 @@ namespace omath
114114 }
115115
116116 [[nodiscard]]
117- constexpr std::partial_ordering operator <=>(const Angle& other) const = default ;
117+ constexpr std::partial_ordering operator <=>(const Angle& other) const noexcept = default ;
118118
119- constexpr Angle& operator -=(const Angle& other)
119+ constexpr Angle& operator -=(const Angle& other) noexcept
120120 {
121121 return operator +=(-other);
122122 }
123123
124124 [[nodiscard]]
125- constexpr Angle& operator +(const Angle& other)
125+ constexpr Angle& operator +(const Angle& other) noexcept
126126 {
127127 if constexpr (flags == AngleFlags::Normalized)
128128 return {angles::wrap_angle (m_angle + other.m_angle , min, max)};
@@ -137,13 +137,13 @@ namespace omath
137137 }
138138
139139 [[nodiscard]]
140- constexpr Angle& operator -(const Angle& other)
140+ constexpr Angle& operator -(const Angle& other) noexcept
141141 {
142142 return operator +(-other);
143143 }
144144
145145 [[nodiscard]]
146- constexpr Angle operator -() const
146+ constexpr Angle operator -() const noexcept
147147 {
148148 return Angle{-m_angle};
149149 }
0 commit comments