micro-test-plus 6.0.1
µTest++ Testing Framework
Loading...
Searching...
No Matches
math-inlines.h File Reference

C++ header file with inline implementations for the µTest++ mathematical utilities. More...

#include <cstdint>

Go to the source code of this file.

Namespaces

namespace  micro_os_plus
 The primary namespace for the µOS++ framework.
namespace  micro_os_plus::micro_test_plus
 Primary namespace for the µTest++ testing framework.
namespace  micro_os_plus::micro_test_plus::detail
 Internal implementation details for the µTest++ framework.
namespace  micro_os_plus::micro_test_plus::detail::math
 Internal mathematical utilities for the µTest++ testing framework.

Functions

template<class T>
constexpr auto micro_os_plus::micro_test_plus::detail::math::abs (const T t) noexcept -> T
 Computes the absolute value of a given comparable value.
template<class T>
constexpr auto micro_os_plus::micro_test_plus::detail::math::min_value (const T &lhs, const T &rhs) noexcept -> const T &
 Computes the minimum of two comparable values.

Detailed Description

This header provides the inline implementations for the mathematical utility templates used within the µTest++ framework. It defines the constexpr absolute value, used by the approximate comparison, and, only if the deprecated functionality is enabled, the minimum value, used by the tolerance of the deprecated wrappers. The exponentiation and the compile-time parsing of the numeric literals are in deprecated-inlines.h.

These utilities support both integral and floating-point types.

All definitions reside within the micro_os_plus::micro_test_plus::detail::math namespace, since they are implementation details of the literals and of the comparisons, not part of the public API.

This file is included by math.h; the applications include micro-os-plus/micro-test-plus.h, not this file.

Definition in file math-inlines.h.