diff --git a/src/Utils/Utils/Alignment.h b/src/Utils/Utils/Alignment.h new file mode 100644 index 00000000..9b0ba20d --- /dev/null +++ b/src/Utils/Utils/Alignment.h @@ -0,0 +1,12 @@ +#pragma once + +namespace utils +{ + template + constexpr T Align(T value, T toNext) + { + if (toNext > 0) + return (value + toNext - 1) / toNext * toNext; + return value; + } +}