cMHN 1.2
C++ library for learning MHNs with pRC
Loading...
Searching...
No Matches
trunc.hpp
Go to the documentation of this file.
1// SPDX-License-Identifier: BSD-2-Clause
2
3#ifndef pRC_CORE_VALUE_FUNCTIONS_TRUNC_H
4#define pRC_CORE_VALUE_FUNCTIONS_TRUNC_H
5
6#include <cmath>
7
10
11namespace pRC
12{
13 template<IsFloat T>
14 static inline constexpr auto trunc(T const &a)
15 {
16 return Float(std::trunc(a()));
17 }
18
19 template<IsInteger T>
20 static inline constexpr auto trunc(T const &a)
21 {
22 return a;
23 }
24}
25#endif // pRC_CORE_VALUE_FUNCTIONS_TRUNC_H
Definition value.hpp:12
Definition cholesky.hpp:10
Float(Float< 16 >::Fundamental const) -> Float< 16 >
static constexpr auto trunc(T const &a)
Definition trunc.hpp:11