3#ifndef _TIME_SHIELD_DETAIL_FLOOR_MATH_HPP_INCLUDED
4#define _TIME_SHIELD_DETAIL_FLOOR_MATH_HPP_INCLUDED
14 TIME_SHIELD_CONSTEXPR
inline T
floor_div(T a, T b)
noexcept {
15 return static_cast<T
>((a / b) - (((a % b) != 0 && a < 0) ? 1 : 0));
20 TIME_SHIELD_CONSTEXPR
inline T
floor_mod(T a, T b)
noexcept {
21 return static_cast<T
>((a % b) + (((a % b) < 0) ? b : 0));
TIME_SHIELD_CONSTEXPR T floor_mod(T a, T b) noexcept
Floor-mod for positive modulus (returns r in [0..b)).
TIME_SHIELD_CONSTEXPR T floor_div(T a, T b) noexcept
Floor division for positive divisor.
Main namespace for the Time Shield library.