tetl 0.1.0
Embedded Template Library
Loading...
Searching...
No Matches
ratio_subtract.hpp
Go to the documentation of this file.
1// SPDX-License-Identifier: BSL-1.0
2
3#ifndef TETL_RATIO_SUBTRACT_HPP
4#define TETL_RATIO_SUBTRACT_HPP
5
7
8namespace etl {
9
14template <typename R1, typename R2>
15using ratio_subtract = ratio<R1::num * R2::den - R2::num * R1::den, R1::den * R2::den>;
16
17} // namespace etl
18
19#endif // TETL_RATIO_SUBTRACT_HPP
ratio< R1::num *R2::den - R2::num *R1::den, R1::den *R2::den > ratio_subtract
The alias template ratio_subtract denotes the result of subtracting two exact rational fractions repr...
Definition ratio_subtract.hpp:15
Definition adjacent_find.hpp:8
The typename template provides compile-time rational arithmetic support. Each instantiation of this t...
Definition ratio.hpp:21