ChimeraTK-DeviceAccess 03.26.00
Loading...
Searching...
No Matches
NumericConverter.h File Reference
#include "Boolean.h"
#include "Void.h"
#include <cmath>
#include <concepts>
#include <limits>
#include <type_traits>
+ Include dependency graph for NumericConverter.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  ChimeraTK
 
namespace  ChimeraTK::numeric
 
namespace  ChimeraTK::numeric::detail
 Replacement for std::round() which also works constexpr and also casts to the target type in the same step.
 

Concepts

concept  ChimeraTK::numeric::Integral
 Concept to require an integral data type incl.
 
concept  ChimeraTK::numeric::Arithmetic
 Concept to require a numeric data type in templates.
 
concept  ChimeraTK::numeric::ArithmeticOrVoid
 Concept to require a numeric data type in templates, or ChimeraTK::Void.
 

Functions

template<Integral TO, std::floating_point FROM>
constexpr TO ChimeraTK::numeric::detail::roundAndCast (FROM x)
 
template<Arithmetic T_LEFT, Arithmetic T_RIGHT>
constexpr bool ChimeraTK::numeric::detail::greaterMaximum ()
 
template<Arithmetic T_LEFT, Arithmetic T_RIGHT>
constexpr bool ChimeraTK::numeric::detail::lesserMinimum ()
 
template<ArithmeticOrVoid TO, ArithmeticOrVoid FROM>
constexpr TO ChimeraTK::numeric::convert (FROM value)
 Convert numeric data types with proper rounding and clamping to the target value range.