libcrn
3.9.5
A document image processing library
|
A convenience class for angles units. More...
#include <CRNTrigonometry.h>
Public Types | |
using | unit = Unit |
Public Member Functions | |
constexpr | Angle () noexcept(std::is_nothrow_constructible< typename Unit::type >::value) |
Null angle. More... | |
Angle (typename Unit::type val) noexcept(std::is_nothrow_constructible< typename Unit::type >::value) | |
Constructor from a value. More... | |
template<typename U > | |
Angle (const Angle< U > &other) noexcept(std::is_nothrow_constructible< typename U::type >::value &&std::is_nothrow_constructible< typename TypeInfo< typename Unit::type >::SumType >::value) | |
Constructor from any other angle unit. More... | |
Angle (const Angle &)=default | |
Angle (Angle &&)=default | |
Angle & | operator= (const Angle &)=default |
Angle & | operator= (Angle &&)=default |
template<typename U > | |
U::type | Get () const noexcept(std::is_nothrow_constructible< typename U::type >::value &&std::is_nothrow_constructible< typename TypeInfo< typename Unit::type >::SumType >::value) |
Conversion to any other angle unit. More... | |
Angle | operator- () const noexcept(std::is_nothrow_copy_assignable< typename Unit::type >::value) |
Negative of the angle. More... | |
const Angle & | operator+= (typename Unit::type angle) noexcept(std::is_nothrow_copy_assignable< typename Unit::type >::value) |
Adds an angle. More... | |
const Angle & | operator+= (const Angle &other) noexcept(std::is_nothrow_copy_assignable< typename Unit::type >::value) |
Adds an angle. More... | |
Angle | operator+ (const Angle &other) const noexcept(std::is_nothrow_copy_assignable< typename Unit::type >::value) |
Adds an angle. More... | |
const Angle & | operator-= (typename Unit::type angle) noexcept(std::is_nothrow_copy_assignable< typename Unit::type >::value) |
Subtracts an angle. More... | |
const Angle & | operator-= (const Angle &other) noexcept(std::is_nothrow_copy_assignable< typename Unit::type >::value) |
Subtracts an angle. More... | |
Angle | operator- (const Angle &other) const noexcept(std::is_nothrow_copy_assignable< typename Unit::type >::value) |
Subtracts an angle. More... | |
Angle & | operator*= (double f) noexcept(std::is_nothrow_copy_assignable< typename Unit::type >::value) |
Multiplies by a scalar. More... | |
Angle & | operator* (double f) noexcept(std::is_nothrow_copy_assignable< typename Unit::type >::value) |
Multiplies by a scalar. More... | |
bool | operator== (const Angle &other) const noexcept |
Comparison operator. More... | |
double | Cos () const noexcept |
Computes cosine. More... | |
double | Sin () const noexcept |
Computes sine. More... | |
double | Tan () const noexcept |
Computes tangent. More... | |
Static Public Member Functions | |
static Angle | Acos (double cosine) noexcept(std::is_nothrow_constructible< typename Unit::type >::value) |
Computes arc cosine. More... | |
static Angle | Asin (double sine) noexcept(std::is_nothrow_constructible< typename Unit::type >::value) |
Computes arc sine. More... | |
static Angle | Atan (double tangent) noexcept(std::is_nothrow_constructible< typename Unit::type >::value) |
Computes arc tangent. More... | |
static Angle | Atan (double y, double x) noexcept(std::is_nothrow_constructible< typename Unit::type >::value) |
Computes arc tangent from coordinates. More... | |
static constexpr Angle< Unit > | LEFT () |
static constexpr Angle< Unit > | RIGHT () |
static constexpr Angle< Unit > | TOP () |
static constexpr Angle< Unit > | BOTTOM () |
Public Attributes | |
Unit::type | value |
A convenience class for angles units.
A convenience class for angles units
Definition at line 139 of file CRNTrigonometry.h.
using crn::Angle< Unit >::unit = Unit |
Definition at line 141 of file CRNTrigonometry.h.
|
inlinenoexcept |
Null angle.
Definition at line 143 of file CRNTrigonometry.h.
|
inlinenoexcept |
Constructor from a value.
Definition at line 146 of file CRNTrigonometry.h.
|
inlinenoexcept |
Constructor from any other angle unit.
Definition at line 157 of file CRNTrigonometry.h.
|
default |
|
default |
|
inlinestaticnoexcept |
Computes arc cosine.
Definition at line 243 of file CRNTrigonometry.h.
|
inlinestaticnoexcept |
Computes arc sine.
Definition at line 245 of file CRNTrigonometry.h.
|
inlinestaticnoexcept |
Computes arc tangent.
Definition at line 247 of file CRNTrigonometry.h.
|
inlinestaticnoexcept |
Computes arc tangent from coordinates.
Definition at line 249 of file CRNTrigonometry.h.
|
inlinestatic |
Angle facing bottom (automatically computed)
Definition at line 254 of file CRNTrigonometry.h.
|
inlinenoexcept |
Computes cosine.
Definition at line 236 of file CRNTrigonometry.h.
|
inlinenoexcept |
Conversion to any other angle unit.
Definition at line 175 of file CRNTrigonometry.h.
|
inlinestatic |
Angle facing left (automatically computed)
Definition at line 251 of file CRNTrigonometry.h.
|
inlinenoexcept |
Multiplies by a scalar.
Definition at line 230 of file CRNTrigonometry.h.
|
inlinenoexcept |
Multiplies by a scalar.
Definition at line 219 of file CRNTrigonometry.h.
|
inlinenoexcept |
Adds an angle.
Definition at line 199 of file CRNTrigonometry.h.
|
inlinenoexcept |
Adds an angle.
Definition at line 187 of file CRNTrigonometry.h.
|
inlinenoexcept |
Adds an angle.
Definition at line 197 of file CRNTrigonometry.h.
|
inlinenoexcept |
Negative of the angle.
Definition at line 183 of file CRNTrigonometry.h.
|
inlinenoexcept |
Subtracts an angle.
Definition at line 215 of file CRNTrigonometry.h.
|
inlinenoexcept |
Subtracts an angle.
Definition at line 202 of file CRNTrigonometry.h.
|
inlinenoexcept |
Subtracts an angle.
Definition at line 212 of file CRNTrigonometry.h.
|
default |
|
default |
|
inlinenoexcept |
Comparison operator.
Definition at line 233 of file CRNTrigonometry.h.
|
inlinestatic |
Angle facing right (automatically computed)
Definition at line 252 of file CRNTrigonometry.h.
|
inlinenoexcept |
Computes sine.
Definition at line 238 of file CRNTrigonometry.h.
|
inlinenoexcept |
Computes tangent.
Definition at line 240 of file CRNTrigonometry.h.
|
inlinestatic |
Angle facing top (automatically computed)
Definition at line 253 of file CRNTrigonometry.h.
Unit::type crn::Angle< Unit >::value |
The value of the angle
Definition at line 256 of file CRNTrigonometry.h.