#pragma once #include "macros.hpp" #include #include template inline auto iround(t val) -> std::enable_if_t>, int> { return (int)std::round(val); } template inline auto uround(t val) -> std::enable_if_t>, unsigned> { return (unsigned)std::fmax(0, std::round(val)); } template force_inline constexpr int signum(const t& x) { return x < t{0} ? -1 : 1; }