summaryrefslogtreecommitdiffhomepage
path: root/qfunctionconfigurator/functionconfig.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'qfunctionconfigurator/functionconfig.cpp')
-rw-r--r--qfunctionconfigurator/functionconfig.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/qfunctionconfigurator/functionconfig.cpp b/qfunctionconfigurator/functionconfig.cpp
index 2a44cba0..38a9e703 100644
--- a/qfunctionconfigurator/functionconfig.cpp
+++ b/qfunctionconfigurator/functionconfig.cpp
@@ -107,9 +107,10 @@ void Map::reload() {
const int mult_ = mult * 20;
int end = std::min<int>(sz, p2.x() * mult_);
int start = p1.x() * mult;
+ const n max = end - start;
for (int j = start; j < end; j++) {
- n t = (j - start) / (n) (end - start);
+ n t = (j - start) / max;
n t2 = t*t;
n t3 = t*t*t;