OGLplus  (0.59.0) a C++ wrapper for rendering APIs

Unit system

Classes

class  eagine::tagged_quantity< T, U >
 Value of type T with a specified unit or tag type U. More...
 

Typedefs

template<typename T >
using eagine::seconds_t = tagged_quantity< T, units::second >
 Alias for type storing duration values in seconds. More...
 
template<typename T >
using eagine::radians_t = tagged_quantity< T, units::radian >
 Alias for type storing angle values in radians. More...
 
template<typename T >
using eagine::degrees_t = tagged_quantity< T, units::degree >
 Alias for type storing angle values in degrees. More...
 
template<typename T >
using eagine::kelvins_t = tagged_quantity< T, units::kelvin >
 Alias for type storing temperature values in kelvins. More...
 

Functions

template<typename T >
static constexpr auto eagine::seconds_ (T value) noexcept -> seconds_t< T >
 Creates a tagged quantity storing value in seconds.
 
template<typename T >
static constexpr auto eagine::radians_ (T value) noexcept -> radians_t< T >
 Creates a tagged quantity storing value in radians. More...
 
template<typename T >
static constexpr auto eagine::right_angles_ (T value) noexcept
 Creates a tagged quantity in units of right angle. More...
 
static constexpr auto eagine::right_angle_ () noexcept
 Creates a tagged quantity a right angle value. More...
 
template<typename T >
static constexpr auto eagine::turns_ (T value) noexcept
 Creates a tagged quantity in full turn units. More...
 
template<typename T >
static constexpr auto eagine::degrees_ (T value) noexcept -> degrees_t< T >
 Creates a tagged quantity storing value in degrees. More...
 
template<typename T >
static constexpr auto eagine::kelvins_ (T value) noexcept -> kelvins_t< T >
 Creates a tagged quantity storing value in kelvins.
 
template<typename Qty , typename = std::enable_if_t<is_convertible_quantity_v<Qty, units::radian>>>
static constexpr auto sin (const Qty &qty)
 Overload of sine for quantities of angle. More...
 
template<typename Qty , typename = std::enable_if_t<is_convertible_quantity_v<Qty, units::radian>>>
static constexpr auto cos (const Qty &qty)
 Overload of cosine for quantities of angle. More...
 
template<typename Qty , typename = std::enable_if_t<is_convertible_quantity_v<Qty, units::radian>>>
static constexpr auto tan (const Qty &qty)
 Overload of tangens for quantities of angle. More...
 
template<typename T >
static constexpr auto arcsin (T x)
 Overload of arc sine for quantities of angle. More...
 
template<typename T >
static constexpr auto arccos (T x)
 Overload of arc cosine for quantities of angle. More...
 
template<typename T >
static constexpr auto arctan (T y, T x)
 Overload of tangens for quantities of angle. More...
 
template<typename T1 , typename U1 , typename T2 , typename U2 >
constexpr auto operator== (const tagged_quantity< T1, U1 > &a, const tagged_quantity< T2, U2 > &b) -> std::enable_if_t< units::is_convertible_v< U2, U1 >, bool >
 Equality comparison.
 
template<typename T1 , typename U1 , typename T2 , typename U2 >
constexpr auto operator!= (const tagged_quantity< T1, U1 > &a, const tagged_quantity< T2, U2 > &b) -> std::enable_if_t< units::is_convertible_v< U2, U1 >, bool >
 Nonequality comparison.
 
template<typename T1 , typename U1 , typename T2 , typename U2 >
constexpr auto operator< (const tagged_quantity< T1, U1 > &a, const tagged_quantity< T2, U2 > &b) -> std::enable_if_t< units::is_convertible_v< U2, U1 >, bool >
 Less-than comparison.
 
template<typename T1 , typename U1 , typename T2 , typename U2 >
constexpr auto operator<= (const tagged_quantity< T1, U1 > &a, const tagged_quantity< T2, U2 > &b) -> std::enable_if_t< units::is_convertible_v< U2, U1 >, bool >
 Less-equal comparison.
 
template<typename T1 , typename U1 , typename T2 , typename U2 >
constexpr auto operator> (const tagged_quantity< T1, U1 > &a, const tagged_quantity< T2, U2 > &b) -> std::enable_if_t< units::is_convertible_v< U2, U1 >, bool >
 Greater-than comparison.
 
template<typename T1 , typename U1 , typename T2 , typename U2 >
constexpr auto operator>= (const tagged_quantity< T1, U1 > &a, const tagged_quantity< T2, U2 > &b) -> std::enable_if_t< units::is_convertible_v< U2, U1 >, bool >
 Greater-equal comparison.
 
template<typename T , typename U >
constexpr auto operator+ (const tagged_quantity< T, U > &a)
 Unary plus operator.
 
template<typename T , typename U >
constexpr auto operator- (const tagged_quantity< T, U > &a)
 Unary negation operator.
 
template<typename T1 , typename U1 , typename T2 , typename U2 >
constexpr auto operator+ (const tagged_quantity< T1, U1 > &a, const tagged_quantity< T2, U2 > &b)
 Addition operator.
 
template<typename T1 , typename U1 , typename T2 , typename U2 >
constexpr auto operator- (const tagged_quantity< T1, U1 > &a, const tagged_quantity< T2, U2 > &b)
 Subtraction operator.
 
template<typename T1 , typename U1 , typename T2 , typename U2 >
constexpr auto operator* (const tagged_quantity< T1, U1 > &a, const tagged_quantity< T2, U2 > &b)
 Multiplication operator.
 
template<typename T1 , typename U , typename T2 , typename = std::enable_if_t<!units::is_unit_v<T2> && !is_tagged_quantity_v<T2>>>
constexpr auto operator* (const tagged_quantity< T1, U > &a, const T2 &c)
 Multiplication by constant operator.
 
template<typename T1 , typename T2 , typename U >
constexpr auto operator* (const T1 &c, const tagged_quantity< T2, U > &a)
 Multiplication by constant operator.
 
template<typename T1 , typename U1 , typename U2 , typename = std::enable_if_t<units::is_unit_v<U2>>>
constexpr auto operator* (const tagged_quantity< T1, U1 > &a, U2)
 Multiplication by unit operator.
 
template<typename T1 , typename U1 , typename T2 , typename U2 >
constexpr auto operator/ (const tagged_quantity< T1, U1 > &a, const tagged_quantity< T2, U2 > &b)
 Division operator.
 
template<typename T1 , typename U , typename T2 , typename = std::enable_if_t<!units::is_unit_v<T2>>>
constexpr auto operator/ (const tagged_quantity< T1, U > &a, const T2 &c)
 Division by constant operator.
 
template<typename T1 , typename U1 , typename U2 , typename = std::enable_if_t<units::is_unit_v<U2>>>
constexpr auto operator/ (const tagged_quantity< T1, U1 > &a, U2)
 Constant division operator.
 

Detailed Description

Typedef Documentation

◆ degrees_t

template<typename T >
using eagine::degrees_t = typedef tagged_quantity<T, units::degree>

Alias for type storing angle values in degrees.

See also
degrees_

◆ kelvins_t

template<typename T >
using eagine::kelvins_t = typedef tagged_quantity<T, units::kelvin>

Alias for type storing temperature values in kelvins.

See also
kelvins_

◆ radians_t

template<typename T >
using eagine::radians_t = typedef tagged_quantity<T, units::radian>

Alias for type storing angle values in radians.

See also
radians_

◆ seconds_t

template<typename T >
using eagine::seconds_t = typedef tagged_quantity<T, units::second>

Alias for type storing duration values in seconds.

See also
seconds_

Function Documentation

◆ arccos()

template<typename T >
static constexpr auto arccos ( x)
related

Overload of arc cosine for quantities of angle.

See also
radians_
degrees_
right_angles_
turns_

◆ arcsin()

template<typename T >
static constexpr auto arcsin ( x)
related

Overload of arc sine for quantities of angle.

See also
radians_
degrees_
right_angles_
turns_

◆ arctan()

template<typename T >
static constexpr auto arctan ( y,
x 
)
related

Overload of tangens for quantities of angle.

See also
radians_
degrees_
right_angles_
turns_

◆ cos()

template<typename Qty , typename = std::enable_if_t<is_convertible_quantity_v<Qty, units::radian>>>
static constexpr auto cos ( const Qty &  qty)
related

Overload of cosine for quantities of angle.

See also
radians_
degrees_
right_angles_
turns_

◆ degrees_()

◆ radians_()

template<typename T >
static constexpr auto eagine::radians_ ( value) -> radians_t<T>
staticconstexprnoexcept

◆ right_angle_()

◆ right_angles_()

template<typename T >
static constexpr auto eagine::right_angles_ ( value)
staticconstexprnoexcept

◆ sin()

template<typename Qty , typename = std::enable_if_t<is_convertible_quantity_v<Qty, units::radian>>>
static constexpr auto sin ( const Qty &  qty)
related

Overload of sine for quantities of angle.

See also
radians_
degrees_
right_angles_
turns_

◆ tan()

template<typename Qty , typename = std::enable_if_t<is_convertible_quantity_v<Qty, units::radian>>>
static constexpr auto tan ( const Qty &  qty)
related

Overload of tangens for quantities of angle.

See also
radians_
degrees_
right_angles_
turns_

◆ turns_()

template<typename T >
static constexpr auto eagine::turns_ ( value)
staticconstexprnoexcept

Copyright © 2015-2021 Matúš Chochlík.
<chochlik -at -gmail.com>
Documentation generated on Tue Apr 13 2021 by Doxygen (version 1.8.17).