EchoMap
2026-07-25 6d3977c
An experimental cross-platform digital signal processing application for sound-source localisation.
Toggle main menu visibility
Loading...
Searching...
No Matches
EmscriptenExtra.hpp
Go to the documentation of this file.
1
9
10
#ifndef ECHOMAP_EMSCRIPTENEXTRA_HPP
11
#define ECHOMAP_EMSCRIPTENEXTRA_HPP
12
13
#if defined(__EMSCRIPTEN__) || defined(__DOXYGEN__)
14
15
#include <
type_traits
>
16
17
namespace
echomap::web
18
{
19
28
template
<
29
class
T,
30
std::enable_if_t<std::is_arithmetic_v<T>>...>
31
static
constexpr
auto
abs
(
32
T
const
& x
33
)
noexcept
34
{
35
return
x < 0 ? -x : x;
36
}
37
38
}
// namespace echomap::web
39
40
#endif
// __EMSCRIPTEN__
41
42
#endif
// ECHOMAP_EMSCRIPTENEXTRA_HPP
echomap::web::abs
static constexpr auto abs(T const &x) noexcept
Constexpr absolute value function for pre-C++23 Emscripten compilers.
Definition
EmscriptenExtra.hpp:31
type_traits
src
web
EmscriptenExtra.hpp
Generated by
1.17.0