di 0.1.0
Loading...
Searching...
No Matches
align_down.h
Go to the documentation of this file.
1#pragma once
2
4#include "di/meta/language.h"
5#include "di/meta/util.h"
6
7namespace di::math {
8namespace detail {
9 struct AlignDownFunction {
10 template<concepts::Integer T>
11 constexpr auto operator()(T a, meta::TypeIdentity<T> b) const -> T {
12 return a / b * b;
13 }
14 };
15}
16
17constexpr inline auto align_down = function::curry_back(detail::AlignDownFunction {}, meta::c_<2ZU>);
18}
19
20namespace di {
22}
constexpr auto curry_back
Definition curry_back.h:141
Definition abs.h:10
constexpr auto align_down
Definition align_down.h:17
Type< TypeConstant< T > > TypeIdentity
This is a helper template to prevent C++ from deducing the type of template argument.
Definition core.h:32
constexpr auto c_
A value of type Constexpr<val>.
Definition constexpr.h:252
Definition any_storable.h:9