Project
Loading...
Searching...
No Matches
internal.h File Reference

Internal header file (providing datatypes, classes, etc.). More...

#include <limits>
#include <utility>
#include <algorithm>
#include <cmath>

Go to the source code of this file.

Classes

struct  SI::internal::detail::vec_trivally_constructible< T >
struct  SI::internal::detail::vec_value_type< T >
struct  SI::internal::detail::vec_value_type< vec_trivally_constructible< T > >
struct  SI::internal::vec< 2, T >
struct  SI::internal::vec< 2, detail::vec_trivally_constructible< T > >
struct  SI::internal::vec< 3, T >
struct  SI::internal::vec< 3, detail::vec_trivally_constructible< T > >
struct  SI::detail::dimension< lengthExp, massExp, timeExp, temperatureExp, currentExp, substanceExp, intensityExp >
struct  SI::detail::dimension_of< T >
struct  SI::detail::dimension_of< dimension< Length, Mass, Time, Temperature, Current, Substance, Intensity > >
struct  SI::detail::dimension_of< quantity< Dimension, T > >
struct  SI::detail::dimension_of< unit< Dimension, Ratio > >
struct  SI::detail::zero_t
struct  SI::detail::scalar_value_type< T >
struct  SI::detail::scalar_value_type< zero_t >
struct  SI::detail::scalar_value_type< quantity< Dimension, T > >
class  SI::detail::quantity_storage< Dimension, T >
struct  SI::detail::quantity< Dimension, T >
struct  SI::detail::is_si< T >
struct  SI::detail::is_si< quantity< Dimension, T > >
struct  SI::detail::is_si< zero_t >
struct  SI::detail::element_count< T >
struct  SI::detail::element_count< quantity< Dimension, T > >
struct  SI::detail::ratio< Num, Den >
struct  SI::detail::tag_celsius
struct  SI::detail::tag_fahrenheit
struct  SI::detail::ratio_product< Lhs, Rhs >
struct  SI::detail::ratio_quotient< Lhs, Rhs >
struct  SI::detail::is_arithmetic< T >
struct  SI::detail::unit< Dimension, UnitRatio >
struct  SI::detail::unit< Dimension, ratio< N, N > >
struct  SI::detail::unit< dimensionless, Ratio >
struct  SI::detail::unit< dimensionless, ratio< N, N > >
struct  SI::is_si< T >

Namespaces

namespace  SI
namespace  SI::internal
namespace  SI::internal::detail
namespace  SI::detail

Macros

#define SI_INLINE   inline
#define SI_INLINE_CONSTEXPR   constexpr SI_INLINE
#define SI_DIMENSION_OP(op_)
#define SI_RETURN_QUANTITY(dimension_, ...)

Typedefs

typedef long double SI::angle
 basic datatype to hold a dimensionless angle, e.g. 3.1415
typedef angle SI::radians
 basic unit of radians for angle
typedef double SI::SIdouble
 internal datatype to hold floating point values
template<class... T>
using SI::internal::detail::vec_common_type_t = std::common_type_t<typename vec_value_type<T>::type...>
template<class T>
using SI::internal::vec2 = vec<2, T>
template<class T>
using SI::internal::vec3 = vec<3, T>
template<class T>
using SI::detail::vec2 = internal::vec2<T>
template<class T>
using SI::detail::vec3 = internal::vec3<T>
template<long Value>
using SI::detail::value_dimension = dimension<Value, Value, Value, Value, Value, Value, Value>
using SI::detail::dimensionless = value_dimension<0>
template<class T>
using SI::detail::dimension_of_t = typename dimension_of<std::decay_t<T>>::type
template<class Lhs, class Rhs>
using SI::detail::dimension_add_impl = SI_DIMENSION_OP(+)
template<class Lhs, class Rhs>
using SI::detail::dimension_subtract_impl = SI_DIMENSION_OP(-)
template<class Lhs, class Rhs>
using SI::detail::dimension_multiply_impl = SI_DIMENSION_OP(*)
template<class Lhs, class Rhs>
using SI::detail::dimension_divide_impl = SI_DIMENSION_OP(/)
template<class Lhs, class Rhs>
using SI::detail::dimension_add = dimension_add_impl <dimension_of_t<Lhs>, dimension_of_t<Rhs>>
template<class Lhs, class Rhs>
using SI::detail::dimension_subtract = dimension_subtract_impl <dimension_of_t<Lhs>, dimension_of_t<Rhs>>
template<class Lhs, class Rhs>
using SI::detail::dimension_multiply = dimension_multiply_impl <dimension_of_t<Lhs>, dimension_of_t<Rhs>>
template<class Lhs, class Rhs>
using SI::detail::dimension_divide = dimension_divide_impl <dimension_of_t<Lhs>, dimension_of_t<Rhs>>
template<class T>
using SI::detail::scalar_value_type_t = typename scalar_value_type<T>::type
template<class Lhs, class Rhs>
using SI::detail::dimension_common = std::conditional_t<std::is_same_v<Lhs, zero_t>, dimension_of_t<Rhs>, dimension_of_t<Lhs>>
template<class T, class U = void, class V = void>
using SI::detail::enable_for_si = std::enable_if_t<is_si_v<T> || is_si_v<U> || is_si_v<V>>
template<class T>
using SI::detail::promoted_scalar_type = std::conditional_t<std::is_same_v<scalar_value_type_t<T>, SIdouble>, SIdouble, SIdouble>
template<class Dimension, long long numerator = 1, long long denumerator = 1>
using SI::unit = detail::unit<detail::dimension_of_t<Dimension>, detail::ratio<numerator, denumerator>>

Functions

template<class T>
SI_INLINE_CONSTEXPR vec2< T > SI::internal::operator- (const vec2< T > &v)
template<class T>
SI_INLINE_CONSTEXPR vec3< T > SI::internal::operator- (const vec3< T > &v)
template<class T, class U>
SI_INLINE_CONSTEXPR bool SI::internal::operator== (const vec2< T > &lhs, const vec2< U > &rhs)
template<class T, class U>
SI_INLINE_CONSTEXPR bool SI::internal::operator== (const vec3< T > &lhs, const vec3< U > &rhs)
template<class T, class U>
SI_INLINE_CONSTEXPR bool SI::internal::operator!= (const vec2< T > &lhs, const vec2< U > &rhs)
template<class T, class U>
SI_INLINE_CONSTEXPR bool SI::internal::operator!= (const vec3< T > &lhs, const vec3< U > &rhs)
template<class T, class U>
SI_INLINE_CONSTEXPR vec2< T > & SI::internal::operator+= (vec2< T > &lhs, const vec2< U > &rhs)
template<class T, class U>
SI_INLINE_CONSTEXPR vec3< T > & SI::internal::operator+= (vec3< T > &lhs, const vec3< U > &rhs)
template<class T, class U>
SI_INLINE_CONSTEXPR vec2< T > & SI::internal::operator-= (vec2< T > &lhs, const vec2< U > &rhs)
template<class T, class U>
SI_INLINE_CONSTEXPR vec3< T > & SI::internal::operator-= (vec3< T > &lhs, const vec3< U > &rhs)
template<class T, class U>
SI_INLINE_CONSTEXPR vec2< T > & SI::internal::operator*= (vec2< T > &lhs, const vec2< U > &rhs)
template<class T, class U>
SI_INLINE_CONSTEXPR vec3< T > & SI::internal::operator*= (vec3< T > &lhs, const vec3< U > &rhs)
template<class T, class U>
SI_INLINE_CONSTEXPR vec2< T > & SI::internal::operator/= (vec2< T > &lhs, const vec2< U > &rhs)
template<class T, class U>
SI_INLINE_CONSTEXPR vec3< T > & SI::internal::operator/= (vec3< T > &lhs, const vec3< U > &rhs)
template<class T, class U>
SI_INLINE_CONSTEXPR std::enable_if_t< std::is_arithmetic_v< U >, vec2< T > & > SI::internal::operator+= (vec2< T > &lhs, U rhs)
template<class T, class U>
SI_INLINE_CONSTEXPR std::enable_if_t< std::is_arithmetic_v< U >, vec3< T > & > SI::internal::operator+= (vec3< T > &lhs, U rhs)
template<class T, class U>
SI_INLINE_CONSTEXPR std::enable_if_t< std::is_arithmetic_v< U >, vec2< T > & > SI::internal::operator-= (vec2< T > &lhs, U rhs)
template<class T, class U>
SI_INLINE_CONSTEXPR std::enable_if_t< std::is_arithmetic_v< U >, vec3< T > & > SI::internal::operator-= (vec3< T > &lhs, U rhs)
template<class T, class U>
SI_INLINE_CONSTEXPR std::enable_if_t< std::is_arithmetic_v< U >, vec2< T > & > SI::internal::operator*= (vec2< T > &lhs, U rhs)
template<class T, class U>
SI_INLINE_CONSTEXPR std::enable_if_t< std::is_arithmetic_v< U >, vec3< T > & > SI::internal::operator*= (vec3< T > &lhs, U rhs)
template<class T, class U>
SI_INLINE_CONSTEXPR std::enable_if_t< std::is_arithmetic_v< U >, vec2< T > & > SI::internal::operator/= (vec2< T > &lhs, U rhs)
template<class T, class U>
SI_INLINE_CONSTEXPR std::enable_if_t< std::is_arithmetic_v< U >, vec3< T > & > SI::internal::operator/= (vec3< T > &lhs, U rhs)
template<class T, class U>
SI_INLINE_CONSTEXPR vec2< detail::vec_common_type_t< T, U > > SI::internal::operator+ (const vec2< T > &lhs, const vec2< U > &rhs)
template<class T, class U>
SI_INLINE_CONSTEXPR vec3< detail::vec_common_type_t< T, U > > SI::internal::operator+ (const vec3< T > &lhs, const vec3< U > &rhs)
template<class T, class U>
SI_INLINE_CONSTEXPR vec2< detail::vec_common_type_t< T, U > > SI::internal::operator- (const vec2< T > &lhs, const vec2< U > &rhs)
template<class T, class U>
SI_INLINE_CONSTEXPR vec3< detail::vec_common_type_t< T, U > > SI::internal::operator- (const vec3< T > &lhs, const vec3< U > &rhs)
template<class T, class U>
SI_INLINE_CONSTEXPR vec2< detail::vec_common_type_t< T, U > > SI::internal::operator* (const vec2< T > &lhs, const vec2< U > &rhs)
template<class T, class U>
SI_INLINE_CONSTEXPR vec3< detail::vec_common_type_t< T, U > > SI::internal::operator* (const vec3< T > &lhs, const vec3< U > &rhs)
template<class T, class U>
SI_INLINE_CONSTEXPR vec2< detail::vec_common_type_t< T, U > > SI::internal::operator/ (const vec2< T > &lhs, const vec2< U > &rhs)
template<class T, class U>
SI_INLINE_CONSTEXPR vec3< detail::vec_common_type_t< T, U > > SI::internal::operator/ (const vec3< T > &lhs, const vec3< U > &rhs)
template<class T, class U>
SI_INLINE_CONSTEXPR vec2< detail::vec_common_type_t< T, U > > SI::internal::operator+ (const vec2< T > &lhs, U rhs)
template<class T, class U>
SI_INLINE_CONSTEXPR vec3< detail::vec_common_type_t< T, U > > SI::internal::operator+ (const vec3< T > &lhs, U rhs)
template<class T, class U>
SI_INLINE_CONSTEXPR vec2< detail::vec_common_type_t< T, U > > SI::internal::operator- (const vec2< T > &lhs, U rhs)
template<class T, class U>
SI_INLINE_CONSTEXPR vec3< detail::vec_common_type_t< T, U > > SI::internal::operator- (const vec3< T > &lhs, U rhs)
template<class T, class U>
SI_INLINE_CONSTEXPR vec2< detail::vec_common_type_t< T, U > > SI::internal::operator* (const vec2< T > &lhs, U rhs)
template<class T, class U>
SI_INLINE_CONSTEXPR vec3< detail::vec_common_type_t< T, U > > SI::internal::operator* (const vec3< T > &lhs, U rhs)
template<class T, class U>
SI_INLINE_CONSTEXPR vec2< detail::vec_common_type_t< T, U > > SI::internal::operator/ (const vec2< T > &lhs, U rhs)
template<class T, class U>
SI_INLINE_CONSTEXPR vec3< detail::vec_common_type_t< T, U > > SI::internal::operator/ (const vec3< T > &lhs, U rhs)
template<class T, class U>
SI_INLINE_CONSTEXPR vec2< detail::vec_common_type_t< T, U > > SI::internal::operator+ (T lhs, const vec2< U > &rhs)
template<class T, class U>
SI_INLINE_CONSTEXPR vec3< detail::vec_common_type_t< T, U > > SI::internal::operator+ (T lhs, const vec3< U > &rhs)
template<class T, class U>
SI_INLINE_CONSTEXPR vec2< detail::vec_common_type_t< T, U > > SI::internal::operator- (T lhs, const vec2< U > &rhs)
template<class T, class U>
SI_INLINE_CONSTEXPR vec3< detail::vec_common_type_t< T, U > > SI::internal::operator- (T lhs, const vec3< U > &rhs)
template<class T, class U>
SI_INLINE_CONSTEXPR vec2< detail::vec_common_type_t< T, U > > SI::internal::operator* (T lhs, const vec2< U > &rhs)
template<class T, class U>
SI_INLINE_CONSTEXPR vec3< detail::vec_common_type_t< T, U > > SI::internal::operator* (T lhs, const vec3< U > &rhs)
template<class T, class U>
SI_INLINE_CONSTEXPR vec2< detail::vec_common_type_t< T, U > > SI::internal::operator/ (T lhs, const vec2< U > &rhs)
template<class T, class U>
SI_INLINE_CONSTEXPR vec3< detail::vec_common_type_t< T, U > > SI::internal::operator/ (T lhs, const vec3< U > &rhs)
template<class T>
SI_INLINE_CONSTEXPR vec2< detail::vec_common_type_t< T > > SI::internal::abs (const vec2< T > &v)
template<class T>
SI_INLINE_CONSTEXPR vec3< detail::vec_common_type_t< T > > SI::internal::abs (const vec3< T > &v)
template<class T>
SI_INLINE_CONSTEXPR std::enable_if_t< std::is_arithmetic_v< T >, T > SI::internal::sign (T x)
template<class T>
SI_INLINE_CONSTEXPR vec2< detail::vec_common_type_t< T > > SI::internal::sign (const vec2< T > &v)
template<class T>
SI_INLINE_CONSTEXPR vec3< detail::vec_common_type_t< T > > SI::internal::sign (const vec3< T > &v)
template<class T, class U>
SI_INLINE_CONSTEXPR std::enable_if_t< std::is_arithmetic_v< T > &&std::is_arithmetic_v< U >, std::common_type_t< T, U > > SI::internal::min (T lhs, U rhs)
template<class T, class U>
SI_INLINE_CONSTEXPR std::enable_if_t< std::is_arithmetic_v< T > &&std::is_arithmetic_v< U >, std::common_type_t< T, U > > SI::internal::max (T lhs, U rhs)
template<class T, class U>
SI_INLINE_CONSTEXPR vec2< detail::vec_common_type_t< T, U > > SI::internal::min (const vec2< T > &lhs, const vec2< U > &rhs)
template<class T, class U>
SI_INLINE_CONSTEXPR vec3< detail::vec_common_type_t< T, U > > SI::internal::min (const vec3< T > &lhs, const vec3< U > &rhs)
template<class T, class U>
SI_INLINE_CONSTEXPR vec2< detail::vec_common_type_t< T, U > > SI::internal::max (const vec2< T > &lhs, const vec2< U > &rhs)
template<class T, class U>
SI_INLINE_CONSTEXPR vec3< detail::vec_common_type_t< T, U > > SI::internal::max (const vec3< T > &lhs, const vec3< U > &rhs)
template<class T, class U, class V>
SI_INLINE_CONSTEXPR std::enable_if_t< std::is_arithmetic_v< T >, std::common_type_t< T, U, V > > SI::internal::clamp (T value, U min, V max)
template<class T, class U, class V>
SI_INLINE_CONSTEXPR vec2< detail::vec_common_type_t< T, U, V > > SI::internal::clamp (const vec2< T > &value, U min, V max)
template<class T, class U, class V>
SI_INLINE_CONSTEXPR vec2< detail::vec_common_type_t< T, U, V > > SI::internal::clamp (const vec2< T > &value, const vec2< U > &min, const vec2< V > &max)
template<class T, class U, class V>
SI_INLINE_CONSTEXPR vec3< detail::vec_common_type_t< T, U, V > > SI::internal::clamp (const vec3< T > &value, U min, V max)
template<class T, class U, class V>
SI_INLINE_CONSTEXPR vec3< detail::vec_common_type_t< T, U, V > > SI::internal::clamp (const vec3< T > &value, const vec3< U > &min, const vec3< V > &max)
template<class T, class U>
SI_INLINE_CONSTEXPR auto SI::internal::dot (const vec2< T > &lhs, const vec2< U > &rhs)
template<class T, class U>
SI_INLINE_CONSTEXPR auto SI::internal::dot (const vec3< T > &lhs, const vec3< U > &rhs)
template<class T>
SI_INLINE auto SI::internal::length (const vec2< T > &v)
template<class T>
SI_INLINE auto SI::internal::length (const vec3< T > &v)
template<class T>
SI_INLINE auto SI::internal::normalize (const vec2< T > &v)
template<class T>
SI_INLINE auto SI::internal::normalize (const vec3< T > &v)
template<class T, class U>
SI_INLINE auto SI::internal::distance (const vec2< T > &a, const vec2< U > &b)
template<class T, class U>
SI_INLINE auto SI::internal::distance (const vec3< T > &a, const vec3< U > &b)
template<class T, class U>
SI_INLINE_CONSTEXPR vec3< detail::vec_common_type_t< T, U > > SI::internal::cross (const vec3< T > &lhs, const vec3< U > &rhs)
template<class T, class U, class V>
SI_INLINE_CONSTEXPR std::common_type_t< T, U, V > SI::internal::mix (T a, U b, V t)
template<class T, class U, class V>
SI_INLINE_CONSTEXPR vec2< detail::vec_common_type_t< T, U, V > > SI::internal::mix (const vec2< T > &a, const vec2< U > &b, V t)
template<class T, class U, class V>
SI_INLINE_CONSTEXPR vec3< detail::vec_common_type_t< T, U, V > > SI::internal::mix (const vec3< T > &a, const vec3< U > &b, V t)
template<class T>
SI_INLINE_CONSTEXPR std::enable_if_t< std::is_arithmetic_v< T > > SI::detail::fill (T &x, T value)
template<class T, class = std::enable_if_t<!is_si_v<T>>>
SI_INLINE_CONSTEXPR const T & SI::detail::value (const T &x)
SI_INLINE_CONSTEXPR long SI::detail::value (zero_t)
template<class T, class U>
SI_INLINE_CONSTEXPR decltype(auto) SI::detail::value2 (T &&x, U)
template<class U>
SI_INLINE_CONSTEXPR auto SI::detail::value2 (zero_t, const U &other)
template<class T, class Dimension>
SI_INLINE_CONSTEXPR quantity< Dimension, T > SI::detail::operator- (quantity< Dimension, T > x)
template<class T, class Dimension, class U>
SI_INLINE_CONSTEXPR quantity< Dimension, T > & SI::detail::operator+= (quantity< Dimension, T > &lhs, const U &rhs)
template<class T, class Dimension, class U>
SI_INLINE_CONSTEXPR quantity< Dimension, T > & SI::detail::operator-= (quantity< Dimension, T > &lhs, const U &rhs)
template<class T, class Dimension, class U>
SI_INLINE_CONSTEXPR quantity< Dimension, T > & SI::detail::operator*= (quantity< Dimension, T > &lhs, const U &rhs)
template<class T, class Dimension, class U>
SI_INLINE_CONSTEXPR quantity< Dimension, T > & SI::detail::operator/= (quantity< Dimension, T > &lhs, const U &rhs)
template<class Lhs, class Rhs, class = enable_for_si<Lhs, Rhs>>
SI_INLINE_CONSTEXPR auto SI::detail::operator< (const Lhs &lhs, const Rhs &rhs)
template<class Lhs, class Rhs, class = enable_for_si<Lhs, Rhs>>
SI_INLINE_CONSTEXPR auto SI::detail::operator<= (const Lhs &lhs, const Rhs &rhs)
template<class Lhs, class Rhs, class = enable_for_si<Lhs, Rhs>>
SI_INLINE_CONSTEXPR auto SI::detail::operator> (const Lhs &lhs, const Rhs &rhs)
template<class Lhs, class Rhs, class = enable_for_si<Lhs, Rhs>>
SI_INLINE_CONSTEXPR auto SI::detail::operator>= (const Lhs &lhs, const Rhs &rhs)
template<class Lhs, class Rhs, class = enable_for_si<Lhs, Rhs>>
SI_INLINE_CONSTEXPR auto SI::detail::operator== (const Lhs &lhs, const Rhs &rhs)
template<class Lhs, class Rhs, class = enable_for_si<Lhs, Rhs>>
SI_INLINE_CONSTEXPR auto SI::detail::operator!= (const Lhs &lhs, const Rhs &rhs)
template<class Lhs, class Rhs, class = enable_for_si<Lhs, Rhs>>
SI_INLINE_CONSTEXPR auto SI::detail::operator+ (const Lhs &lhs, const Rhs &rhs)
template<class Lhs, class Rhs, class = enable_for_si<Lhs, Rhs>>
SI_INLINE_CONSTEXPR auto SI::detail::operator- (const Lhs &lhs, const Rhs &rhs)
template<class Lhs, class Rhs, class = enable_for_si<Lhs, Rhs>>
SI_INLINE_CONSTEXPR auto SI::detail::operator* (const Lhs &lhs, const Rhs &rhs)
template<class Lhs, class Rhs, class = enable_for_si<Lhs, Rhs>>
SI_INLINE_CONSTEXPR auto SI::detail::operator/ (const Lhs &lhs, const Rhs &rhs)
template<class Dimension, class T>
SI_INLINE_CONSTEXPR quantity< Dimension, T > SI::detail::abs (const quantity< Dimension, T > &x)
template<class Lhs, class Rhs, class = enable_for_si<Lhs, Rhs>>
SI_INLINE_CONSTEXPR auto SI::detail::dot (const Lhs &lhs, const Rhs &rhs)
template<class Dimension, class T>
SI_INLINE auto SI::detail::normalize (const quantity< Dimension, T > &x)
template<class Dimension, class T>
SI_INLINE auto SI::detail::norm (const quantity< Dimension, T > &x)
template<class T>
SI_INLINE auto SI::detail::distance (const quantity< dimension< 1, 0, 0, 0, 0, 0, 0 >, T > &a, const quantity< dimension< 1, 0, 0, 0, 0, 0, 0 >, T > &b)
template<long Exponent, class Dimension, class T>
SI_INLINE auto SI::detail::pow (const quantity< Dimension, T > &x)
template<long Degree, class Dimension, class T>
SI_INLINE auto SI::detail::root (const quantity< Dimension, T > &x)
template<class Dimension, class T>
SI_INLINE auto SI::detail::sqrt (const quantity< Dimension, T > &x)
template<class Dimension, class T>
SI_INLINE_CONSTEXPR auto SI::detail::deangle (const quantity< Dimension, T > &x)
template<class Value, class Min, class Max>
SI_INLINE_CONSTEXPR auto SI::detail::clamp (const Value &x, const Min &min, const Max &max)
template<class DimensionLhs, class RatioLhs, class DimensionRhs, class RatioRhs>
SI_INLINE_CONSTEXPR auto SI::detail::operator* (unit< DimensionLhs, RatioLhs >, unit< DimensionRhs, RatioRhs >)
template<class DimensionLhs, class RatioLhs, class DimensionRhs, class RatioRhs>
SI_INLINE_CONSTEXPR auto SI::detail::operator/ (unit< DimensionLhs, RatioLhs >, unit< DimensionRhs, RatioRhs >)
template<class Dimension, class T>
SI_INLINE_CONSTEXPR quantity< Dimension, T > SI::abs (const quantity< Dimension, T > &x)
template<class Dimension, class T>
SI_INLINE auto SI::normalize (const quantity< Dimension, T > &x)
template<class Dimension, class T>
SI_INLINE auto SI::norm (const quantity< Dimension, T > &x)
template<class T>
SI_INLINE auto SI::distance (const quantity< dimension< 1, 0, 0, 0, 0, 0, 0 >, T > &a, const quantity< dimension< 1, 0, 0, 0, 0, 0, 0 >, T > &b)
template<long Exponent, class Dimension, class T>
SI_INLINE auto SI::pow (const quantity< Dimension, T > &x)
template<long Degree, class Dimension, class T>
SI_INLINE auto SI::root (const quantity< Dimension, T > &x)
template<class Dimension, class T>
SI_INLINE auto SI::sqrt (const quantity< Dimension, T > &x)
template<class Lhs, class Rhs, class = enable_for_si<Lhs, Rhs>>
SI_INLINE_CONSTEXPR auto SI::dot (const Lhs &lhs, const Rhs &rhs)
template<class Value, class Min, class Max>
SI_INLINE_CONSTEXPR auto SI::clamp (const Value &x, const Min &min, const Max &max)
template<class Dimension, class T>
SI_INLINE_CONSTEXPR auto SI::deangle (const quantity< Dimension, T > &x)

Variables

template<class T>
SI_INLINE_CONSTEXPR bool SI::detail::is_dimensionless_v = std::is_same_v<dimensionless, dimension_of_t<T>>
template<class T>
SI_INLINE_CONSTEXPR bool SI::detail::is_si_v = is_si<T>::value
template<class Lhs, class Rhs>
SI_INLINE_CONSTEXPR bool SI::detail::has_common_dimension_v
template<class T>
SI_INLINE_CONSTEXPR long SI::detail::element_count_v = element_count<T>::value
SI_INLINE_CONSTEXPR detail::zero_t SI::zero
template<class T>
SI_INLINE_CONSTEXPR bool SI::is_si_v

Detailed Description

Internal header file (providing datatypes, classes, etc.).

Macro Definition Documentation

◆ SI_DIMENSION_OP

#define SI_DIMENSION_OP ( op_)
Value:
dimension< \
Lhs::length op_ Rhs::length, \
Lhs::mass op_ Rhs::mass, \
Lhs::time op_ Rhs::time, \
Lhs::temperature op_ Rhs::temperature, \
Lhs::current op_ Rhs::current, \
Lhs::substance op_ Rhs::substance, \
Lhs::intensity op_ Rhs::intensity>

◆ SI_INLINE

#define SI_INLINE   inline

◆ SI_INLINE_CONSTEXPR

#define SI_INLINE_CONSTEXPR   constexpr SI_INLINE

◆ SI_RETURN_QUANTITY

#define SI_RETURN_QUANTITY ( dimension_,
... )
Value:
if constexpr(is_dimensionless_v<dimension_>) return (__VA_ARGS__); \
else return quantity{dimension_(), (__VA_ARGS__)}