|
| template<typename T> |
| constexpr T | Square (T val) noexcept |
| | This is usefull because it saves a temp.
|
| template<typename T> |
| constexpr T | Cube (T val) noexcept |
|
template<int Y, typename T> |
| constexpr T | pow (T val) noexcept |
| | power function with templated integer exponent.
|
|
template<typename T> |
| constexpr bool | Equals (T a, T b, T epsilon) noexcept |
| | Tests equality in the sense |a-b| < epsilon.
|
| template<typename T> |
| constexpr auto | Sign (T val) noexcept -> decltype(T{}/T{}) |
| constexpr int | Factorial (int n) |
| template<typename T1, typename T2> |
| T1 | Clip (T1 &val, const T2 &min, const T2 &max) noexcept |
| | Clips a val to a specified range.
|
| template<class T> |
| constexpr const T & | Clamp (const T &v, const T &lo, const T &hi) noexcept |
| | Clips a val to a specified range.
|
| template<typename T1, typename T2> |
| T1 | Wrap (const T1 &val, const T2 &min, const T2 &max) noexcept |
| | Wraps a val to a specified range as if max would be actually min.
|
| template<class T> |
| T | Round (T value, int toDigit) noexcept |
| | Rounding of floating point number to a certain digit aftzer the point.
|
| template<typename Valtype> |
| Valtype | DealDenormalizedNumbers (Valtype val) |
| | Make too small numbers zero.
|
| template<typename Valtype> |
| constexpr Valtype | FirstPearl (int cntPearls, Valtype distPearls) noexcept |
| | Center an equidistant row of elements (pearls).
|
|
char | to_uppercase (unsigned char c) |
|
char | to_lowercase (unsigned char c) |
|
std::string | quoted (const std::string &str) |
| | Construct a quoted string.
|
|
std::string | StripApostrophes (const std::string &str) |
| | Removes the outmost apostrophes (''' and '"') from a string. Does nothing if the string isn't properly enclosed with apostrophes.
|
|
std::string | StripReservedCharacters (const std::string &str) |
| | Removes characters that might not be allowed for file names.
|
|
std::string | Indent (int indent) |
| | Needed since for unknown reason, the straightforward implementation std::string{ indent, ' ' } does not work.
|
| template<typename Valtype> |
| Valtype | AttenuateValue (Valtype value, Valtype dattenuation) noexcept |
| | Attenuates value by the factor dattenuation.
|
| template<typename Valtype> |
| constexpr Valtype | Collision (Valtype m1, Valtype m2, Valtype v1, Valtype v2, Valtype k) |
| | Calculates the impulse change of body 1 in a collision event.
|
|
void | TranslateEscapeCharacters (std::string &string) |
|
std::string | utf8_to_string (const std::string &utf8str, const std::locale &loc=std::locale("")) |
| | convert multibyte character string (UTF-8) to ANSI string.
|
| template<typename Valtype> |
| constexpr bool | Intersecting (const Interval< Valtype > &i1, const Interval< Valtype > &i2) noexcept |
| template<typename Valtype> |
| constexpr bool | IntersectingClosed (const Interval< Valtype > &i1, const Interval< Valtype > &i2) noexcept |
| template<typename Valtype> |
| constexpr bool | IntersectingOpen (const Interval< Valtype > &i1, const Interval< Valtype > &i2) noexcept |
| template<typename Valtype> |
| constexpr bool | Touching (const Interval< Valtype > &i1, const Interval< Valtype > &i2) noexcept |
| template<typename Valtype> |
| constexpr Interval< Valtype > | Intersection (const Interval< Valtype > &intersected, const Interval< Valtype > &with) noexcept |
| template<class Valtype, class EvalFuncType> |
| void | Sample (const common::Interval< Valtype > range, const EvalFuncType Evaluate) |
| | Samples an evaluating function inside an interval.
|
| template<typename Target, typename Source> |
| Target | narrow_cast (Source v) |
| | Safe cast for casting numeric values.
|
|
template<typename Target, typename Source> |
| std::unique_ptr< Target > | dynamic_unique_cast (std::unique_ptr< Source > &&source) |
|
std::ostream & | operator<< (std::ostream &stream, TextColor color) |
|
std::ostream & | operator<< (std::ostream &stream, BackgroundColor color) |
|
std::ostream & | rendl (std::ostream &stream) |
|
void | StreamInHead (std::istream &is, const std::string &head) |
|
template<typename Valtype> |
| void | operator+= (Interval< Valtype > &i1, const Interval< Valtype > &i2) noexcept |
| | Interval operator.
|
|
template<typename Valtype> |
| constexpr Interval< Valtype > | operator+ (const Interval< Valtype > &i1, const Interval< Valtype > &i2) noexcept |
| | Interval operator.
|
|
template<typename Valtype> |
| constexpr Interval< Valtype > | operator+ (const Interval< Valtype > &i1, Valtype l) noexcept |
| | Interval operator.
|
|
template<typename Valtype> |
| constexpr Interval< Valtype > | operator+ (Valtype l, const Interval< Valtype > &i1) noexcept |
| | Interval operator.
|
|
template<typename Valtype> |
| constexpr Interval< Valtype > | operator+ (const Interval< Valtype > &i1) noexcept |
| | Interval operator.
|
|
template<typename Valtype> |
| constexpr Interval< Valtype > | operator- (const Interval< Valtype > &i1, Valtype l) noexcept |
| | Interval operator.
|
|
template<typename Valtype> |
| constexpr Interval< Valtype > | operator- (Valtype l, const Interval< Valtype > &i1) noexcept |
| | Interval operator.
|
|
template<typename Valtype> |
| constexpr Interval< Valtype > | operator- (const Interval< Valtype > &i1) noexcept |
| | Interval operator.
|
|
template<typename Valtype, typename Valtype2> |
| constexpr auto | operator* (const Interval< Valtype > &i1, Valtype2 scalar) noexcept -> Interval< decltype(Valtype{} *Valtype2{})> |
| | Interval operator.
|
|
template<typename Valtype, typename Valtype2> |
| constexpr auto | operator* (Valtype scalar, const Interval< Valtype2 > &i1) noexcept -> Interval< decltype(Valtype{} *Valtype2{})> |
| | Interval operator.
|
|
template<typename Valtype, typename Valtype2> |
| constexpr Interval< Valtype > & | operator*= (Interval< Valtype > &i1, Valtype2 scalar) noexcept |
| | Interval operator.
|
|
template<typename Valtype, typename Valtype2> |
| constexpr auto | operator/ (const Interval< Valtype > &i1, Valtype2 scalar) noexcept -> Interval< decltype(Valtype{}/Valtype2{})> |
| | Interval operator.
|
|
template<typename Valtype, typename Valtype2> |
| constexpr Interval< Valtype > & | operator/= (Interval< Valtype > &i1, Valtype2 scalar) noexcept |
| | Interval operator.
|
| template<typename Valtype> |
| constexpr bool | operator< (const Interval< Valtype > &i1, const Interval< Valtype > &i2) noexcept |
| template<typename Valtype> |
| constexpr bool | operator> (const Interval< Valtype > &i1, const Interval< Valtype > &i2) noexcept |
| template<typename Valtype> |
| constexpr bool | SmallerClosed (const Interval< Valtype > &i1, const Interval< Valtype > &i2) noexcept |
| template<typename Valtype> |
| constexpr bool | SmallerOpen (const Interval< Valtype > &i1, const Interval< Valtype > &i2) noexcept |
| template<typename Valtype> |
| constexpr bool | GreaterClosed (const Interval< Valtype > &i1, const Interval< Valtype > &i2) noexcept |
| template<typename Valtype> |
| constexpr bool | GreaterOpen (const Interval< Valtype > &i1, const Interval< Valtype > &i2) noexcept |
|
template<typename Valtype> |
| constexpr bool | operator== (const Interval< Valtype > &i1, const Interval< Valtype > &i2) noexcept |
| | Interval operator.
|
|
template<typename Valtype> |
| constexpr bool | operator!= (const Interval< Valtype > &i1, const Interval< Valtype > &i2) noexcept |
| | Interval operator.
|
|
|
template<typename Valtype> |
| std::ostream & | operator<< (std::ostream &os, const common::Interval< Valtype > &i) |
| | Streams Interval data out.
|
|
template<typename Valtype> |
| std::istream & | operator>> (std::istream &is, common::Interval< Valtype > &i) |
| | Streams Interval data in.
|
Namespace of common utility classes and methods.