summaryrefslogtreecommitdiff
path: root/zen/basic_math.h
diff options
context:
space:
mode:
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