tetl
0.1.0
Embedded Template Library
Loading...
Searching...
No Matches
ratio_add.hpp
Go to the documentation of this file.
1
// SPDX-License-Identifier: BSL-1.0
2
3
#ifndef TETL_RATIO_ADD_HPP
4
#define TETL_RATIO_ADD_HPP
5
6
#include <
etl/_ratio/ratio.hpp
>
7
8
namespace
etl
{
9
14
template
<
typename
R1,
typename
R2>
15
using
ratio_add
=
ratio<R1::num * R2::den + R2::num * R1::den, R1::den * R2::den>
;
16
17
}
// namespace etl
18
19
#endif
// TETL_RATIO_ADD_HPP
ratio.hpp
etl::ratio_add
ratio< R1::num *R2::den+R2::num *R1::den, R1::den *R2::den > ratio_add
The alias template ratio_add denotes the result of adding two exact rational fractions represented by...
Definition
ratio_add.hpp:15
etl
Definition
adjacent_find.hpp:8
etl::ratio
The typename template provides compile-time rational arithmetic support. Each instantiation of this t...
Definition
ratio.hpp:21
include
etl
_ratio
ratio_add.hpp
Generated on Sat Mar 8 2025 16:19:59 for tetl by
1.14.0