summaryrefslogtreecommitdiff
path: root/zen/basic_math.h
diff options
context:
space:
mode:
authorB. Stack <bgstack15@gmail.com>2023-02-21 12:13:36 -0500
committerB. Stack <bgstack15@gmail.com>2023-02-21 12:13:36 -0500
commit5a6ed4e8eadf3af3d141b246f124d67b62a1357c (patch)
tree4e49ae80efbe181c46110867fe7cf703efd3fcf5 /zen/basic_math.h
parentargon2 copyright notice updated (diff)
downloadFreeFileSync-5a6ed4e8eadf3af3d141b246f124d67b62a1357c.tar.gz
FreeFileSync-5a6ed4e8eadf3af3d141b246f124d67b62a1357c.tar.bz2
FreeFileSync-5a6ed4e8eadf3af3d141b246f124d67b62a1357c.zip
add upstream 12.112.1
Diffstat (limited to 'zen/basic_math.h')
-rw-r--r--zen/basic_math.h20
1 files changed, 10 insertions, 10 deletions
diff --git a/zen/basic_math.h b/zen/basic_math.h
index 7258128f..77ce7b7e 100644
--- a/zen/basic_math.h
+++ b/zen/basic_math.h
@@ -29,8 +29,8 @@ template <class N, class D> auto intDivFloor(N numerator, D denominator);
template <size_t N, class T>
T power(T value);
-double radToDeg(double rad); //convert unit [rad] into [°]
-double degToRad(double degree); //convert unit [°] into [rad]
+double radToDeg(double rad); //convert unit [rad] into [°]
+double degToRad(double degree); //convert unit [°] into [rad]
template <class InputIterator>
double arithmeticMean(InputIterator first, InputIterator last);
@@ -84,13 +84,13 @@ std::pair<InputIterator, InputIterator> minMaxElement(InputIterator first, Input
{
//by factor 1.5 to 3 faster than boost::minmax_element (=two-step algorithm) for built-in types!
- InputIterator lowest = first;
- InputIterator largest = first;
+ InputIterator itMin = first;
+ InputIterator itMax = first;
if (first != last)
{
- auto minVal = *lowest; //nice speedup on 64 bit!
- auto maxVal = *largest; //
+ auto minVal = *itMin; //nice speedup on 64 bit!
+ auto maxVal = *itMax; //
for (;;)
{
++first;
@@ -100,17 +100,17 @@ std::pair<InputIterator, InputIterator> minMaxElement(InputIterator first, Input
if (compLess(maxVal, val))
{
- largest = first;
+ itMax = first;
maxVal = val;
}
else if (compLess(val, minVal))
{
- lowest = first;
+ itMin = first;
minVal = val;
}
}
}
- return {lowest, largest};
+ return {itMin, itMax};
}
@@ -143,7 +143,7 @@ auto roundToGrid(T val, InputIterator first, InputIterator last)
template <class T> inline
bool isNull(T value)
{
- return abs(value) <= std::numeric_limits<T>::epsilon(); //epsilon is 0 für integral types => less-equal
+ return abs(value) <= std::numeric_limits<T>::epsilon(); //epsilon is 0 für integral types => less-equal
}
bgstack15