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

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

#include <array>
#include <limits>
#include "inlines/math-inlines.h"

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 declaration of the mathematical utility template used within the µTest++ framework: the 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, which serve only the deprecated wrappers and literals, are declared in deprecated.h.

These utilities are lightweight, constexpr, and 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 comparisons, not part of the public API.

This file is included by micro-os-plus/micro-test-plus.h, which is the header that the applications include.

Definition in file math.h.