Blaze
3.9
blaze
math
shims
PrevMultiple.h
Go to the documentation of this file.
1
//=================================================================================================
33
//=================================================================================================
34
35
#ifndef _BLAZE_MATH_SHIMS_PREVMULTIPLE_H_
36
#define _BLAZE_MATH_SHIMS_PREVMULTIPLE_H_
37
38
39
//*************************************************************************************************
40
// Includes
41
//*************************************************************************************************
42
43
#include <
blaze/system/Inline.h
>
44
45
46
namespace
blaze {
47
48
//=================================================================================================
49
//
50
// PREVMULTIPLE SHIM
51
//
52
//=================================================================================================
53
54
//*************************************************************************************************
67
template
<
typename
T1,
typename
T2 >
68
BLAZE_ALWAYS_INLINE
constexpr
auto
prevMultiple
( T1 value, T2 factor )
noexcept
69
{
70
return
( value - ( value % factor ) );
71
}
72
//*************************************************************************************************
73
74
}
// namespace blaze
75
76
#endif
blaze::prevMultiple
BLAZE_ALWAYS_INLINE constexpr auto prevMultiple(T1 value, T2 factor) noexcept
Rounds down an integral value to the previous multiple of a given factor.
Definition:
PrevMultiple.h:68
BLAZE_ALWAYS_INLINE
#define BLAZE_ALWAYS_INLINE
Platform dependent setup of an enforced inline keyword.
Definition:
Inline.h:85
Inline.h
System settings for the inline keywords.
Generated by
1.9.3