Blender V4.3
BLI_math_mpq.hh
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2023 Blender Authors
2 *
3 * SPDX-License-Identifier: GPL-2.0-or-later */
4
5#pragma once
6
11#ifdef WITH_GMP
12
13/* This file uses an external file header to define the multi-precision
14 * rational type, mpq_class.
15 * This class keeps separate multi-precision integer numerator and
16 * denominator, reduced to lowest terms after each arithmetic operation.
17 * It can be used where it is important to have exact arithmetic results.
18 *
19 * See gmplib.org for full documentation. In particular:
20 * https://gmplib.org/manual/C_002b_002b-Interface-Rationals
21 */
22# include "gmpxx.h"
23
24# include "BLI_math_base.hh"
25
26namespace blender::math {
27template<> inline constexpr bool is_math_float_type<mpq_class> = true;
28}
29
30#endif /* WITH_GMP */
constexpr bool is_math_float_type