EchoMap 2026-07-25 6d3977c
An experimental cross-platform digital signal processing application for sound-source localisation.
Loading...
Searching...
No Matches
EmscriptenExtra.hpp File Reference

EmscriptenExtra specification. More...

#include <type_traits>

Go to the source code of this file.

Namespaces

namespace  echomap
 The main EchoMap outermost namespace for all non-exported symbols.

Functions

template<class T, std::enable_if_t< std::is_arithmetic_v< T > > ...>
static constexpr auto echomap::web::abs (T const &x) noexcept
 Constexpr absolute value function for pre-C++23 Emscripten compilers.

Detailed Description

EmscriptenExtra specification.

Author
Oliver Dixon
Date
2026-07-17

Definition in file EmscriptenExtra.hpp.

Function Documentation

◆ abs()

template<class T, std::enable_if_t< std::is_arithmetic_v< T > > ...>
constexpr auto echomap::web::abs ( T const & x)
staticconstexprnoexcept

Constexpr absolute value function for pre-C++23 Emscripten compilers.

Template Parameters
TScalar type.
Parameters
xScalar value.
Returns
The absolute value of the given scalar value.

Definition at line 31 of file EmscriptenExtra.hpp.

34{
35 return x < 0 ? -x : x;
36}