Skip to main content

FloatingPointTypeTrait.ixx File

Included Headers

#include <type_traits>

Namespaces Index

namespacehelios
namespacemath

Mathematical operations and types. More...

File Listing

The file content with the documentation metadata removed is:

1module;
2
3#include <type_traits>
4
5export module helios.math.traits.FloatingPointType;
6
7
8
9export namespace helios::math {
10
11 /**
12 * @brief Type trait that promotes integral types to double,
13 * while preserving floating-point types.
14 *
15 * @tparam T the input type
16 */
17 template <typename T>
18 using FloatingPointType = std::conditional_t<
19 std::is_floating_point_v<T>,
20 T,
21 double
22 >;
23
24
25}

Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.15.0.