summaryrefslogtreecommitdiff
path: root/zen/basic_math.h
diff options
context:
space:
mode:
authorB. Stack <bgstack15@gmail.com>2022-05-22 17:03:17 -0400
committerB. Stack <bgstack15@gmail.com>2022-05-22 17:03:17 -0400
commit2c81be72eef5363736cf1892646c74a3311ee4c1 (patch)
tree3894ba7e10c78750c195381a861da5e8166a6bfd /zen/basic_math.h
parentMerge branch 'b11.20' into 'master' (diff)
downloadFreeFileSync-2c81be72eef5363736cf1892646c74a3311ee4c1.tar.gz
FreeFileSync-2c81be72eef5363736cf1892646c74a3311ee4c1.tar.bz2
FreeFileSync-2c81be72eef5363736cf1892646c74a3311ee4c1.zip
add upstream 11.21b11.21
Diffstat (limited to 'zen/basic_math.h')
-rw-r--r--zen/basic_math.h19
1 files changed, 9 insertions, 10 deletions
diff --git a/zen/basic_math.h b/zen/basic_math.h
index 944a0f53..c8a06b78 100644
--- a/zen/basic_math.h
+++ b/zen/basic_math.h
@@ -8,7 +8,6 @@
#define BASIC_MATH_H_3472639843265675
#include <cassert>
-#include <algorithm>
#include <cmath>
#include <numbers>
#include "type_traits.h"
@@ -152,10 +151,10 @@ template <class N, class D> inline
auto intDivRound(N num, D den)
{
using namespace zen;
- static_assert(IsIntegerV<N>&& IsIntegerV<D>);
- static_assert(IsSignedIntV<N> == IsSignedIntV<D>); //until further
+ static_assert(isInteger<N>&& isInteger<D>);
+ static_assert(isSignedInt<N> == isSignedInt<D>); //until further
assert(den != 0);
- if constexpr (IsSignedIntV<N>)
+ if constexpr (isSignedInt<N>)
{
if ((num < 0) != (den < 0))
return (num - den / 2) / den;
@@ -168,10 +167,10 @@ template <class N, class D> inline
auto intDivCeil(N num, D den)
{
using namespace zen;
- static_assert(IsIntegerV<N>&& IsIntegerV<D>);
- static_assert(IsSignedIntV<N> == IsSignedIntV<D>); //until further
+ static_assert(isInteger<N>&& isInteger<D>);
+ static_assert(isSignedInt<N> == isSignedInt<D>); //until further
assert(den != 0);
- if constexpr (IsSignedIntV<N>)
+ if constexpr (isSignedInt<N>)
{
if ((num < 0) != (den < 0))
return num / den;
@@ -187,10 +186,10 @@ template <class N, class D> inline
auto intDivFloor(N num, D den)
{
using namespace zen;
- static_assert(IsIntegerV<N>&& IsIntegerV<D>);
- static_assert(IsSignedIntV<N> == IsSignedIntV<D>); //until further
+ static_assert(isInteger<N>&& isInteger<D>);
+ static_assert(isSignedInt<N> == isSignedInt<D>); //until further
assert(den != 0);
- if constexpr (IsSignedIntV<N>)
+ if constexpr (isSignedInt<N>)
{
if ((num < 0) != (den < 0))
{
bgstack15