psl::math namespace

conversions

functions

round_to<…>
round to nearest multiple of N
public constexpr static noexcept
ceil_to<…>
ceil to nearest multiple of N
public constexpr static noexcept
floor_to<…>
floor to nearest multiple of N
public constexpr static noexcept

Function documentation

template<typename precision_t>
static precision_t psl::math::round_to(precision_t N, precision_t value) constexpr noexcept

Brief

round to nearest multiple of N

Parameters
in the multiple to round to
value in the value to round

template<typename precision_t>
static precision_t psl::math::ceil_to(precision_t N, precision_t value) constexpr noexcept

Brief

ceil to nearest multiple of N

Parameters
in the multiple to ceil to
value in the value to ceil

template<typename precision_t>
static precision_t psl::math::floor_to(precision_t N, precision_t value) constexpr noexcept

Brief

floor to nearest multiple of N

Parameters
in the multiple to floor to
value in the value to floor