Sequoia
Loading...
Searching...
No Matches
Classes | Namespaces | Typedefs | Enumerations | Variables
Ratio.hpp File Reference
#include <numeric>
#include <ratio>

Go to the source code of this file.

Classes

struct  sequoia::maths::ratio< Num, Den >
 
struct  sequoia::maths::impl::ratio_product< Relaxed, ratio< Num1, Den1 >, ratio< Num2, Den2 > >
 
struct  sequoia::maths::impl::ratio_product< Relaxed, ratio< Num1, Den1 >, std::ratio< Num2, Den2 > >
 
struct  sequoia::maths::impl::ratio_product< Relaxed, std::ratio< Num1, Den1 >, ratio< Num2, Den2 > >
 
struct  sequoia::maths::impl::ratio_product< Relaxed, std::ratio< Num1, Den1 >, std::ratio< Num2, Den2 > >
 

Namespaces

namespace  sequoia::maths::impl
 Class designed for inheritance by concerete coordinate types.
 

Typedefs

template<allow_ratio_fp_conversion Relaxed, class T , class U >
using sequoia::maths::impl::ratio_product_t = ratio_product< Relaxed, T, U >::type
 
template<class T , class U , allow_ratio_fp_conversion Relaxed = allow_ratio_fp_conversion::no>
using sequoia::maths::ratio_multiply = impl::ratio_product_t< Relaxed, T, U >
 
template<class T , class U , allow_ratio_fp_conversion Relaxed = allow_ratio_fp_conversion::no>
using sequoia::maths::ratio_divide = impl::ratio_product_t< Relaxed, T, ratio< U::den, U::num > >
 

Enumerations

enum class  allow_ratio_fp_conversion : bool { no , yes }
 

Variables

template<class T >
constexpr bool sequoia::maths::defines_ratio_v
 

Variable Documentation

◆ defines_ratio_v

template<class T >
constexpr bool sequoia::maths::defines_ratio_v
inlineconstexpr
Initial value:
{
requires {
T::num;
T::den;
requires arithmetic<decltype(T::num)>;
requires arithmetic<decltype(T::den)>;
}
}
\brieft A concept for arithmetic types
Definition: Concepts.hpp:81