diff options
author | Daniel Wilhelm <daniel@wili.li> | 2015-10-02 14:56:07 +0200 |
---|---|---|
committer | Daniel Wilhelm <daniel@wili.li> | 2015-10-02 14:56:07 +0200 |
commit | de73d25e0b27f4bee2de116d19cab32800785d64 (patch) | |
tree | 21de1736d12a92223ad04c02a5b0826d77e5e71c /wx+/graph.cpp | |
parent | 7.1 (diff) | |
download | FreeFileSync-de73d25e0b27f4bee2de116d19cab32800785d64.tar.gz FreeFileSync-de73d25e0b27f4bee2de116d19cab32800785d64.tar.bz2 FreeFileSync-de73d25e0b27f4bee2de116d19cab32800785d64.zip |
7.2
Diffstat (limited to 'wx+/graph.cpp')
-rw-r--r-- | wx+/graph.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/wx+/graph.cpp b/wx+/graph.cpp index 3ab045b7..d76e4d41 100644 --- a/wx+/graph.cpp +++ b/wx+/graph.cpp @@ -120,7 +120,7 @@ int widenRange(double& valMin, double& valMax, //in/out const double minValRangePerBlock = (valMax - valMin) / graphAreaSize; const double proposedValRangePerBlock = (valMax - valMin) * optimalBlockSizePx / graphAreaSize; double valRangePerBlock = labelFmt.getOptimalBlockSize(proposedValRangePerBlock); - assert(numeric::isNull(proposedValRangePerBlock) || valRangePerBlock > minValRangePerBlock); + assert(numeric::isNull(proposedValRangePerBlock) || valRangePerBlock > minValRangePerBlock); if (numeric::isNull(valRangePerBlock)) //valMin == valMax or strange "optimal block size" return 1; @@ -131,15 +131,15 @@ int widenRange(double& valMin, double& valMax, //in/out double blockMin = std::floor(valMin / valRangePerBlock); //store as double, not int: truncation possible, e.g. if valRangePerBlock == 1 double blockMax = std::ceil (valMax / valRangePerBlock); // - int blockCount = numeric::round(blockMax - blockMin); - assert(blockCount >= 0); + int blockCount = numeric::round(blockMax - blockMin); + assert(blockCount >= 0); - //handle valMin == valMax == integer + //handle valMin == valMax == integer if (blockCount <= 0) - { - ++blockMax; - blockCount = 1; - } + { + ++blockMax; + blockCount = 1; + } valMin = blockMin * valRangePerBlock; valMax = blockMax * valRangePerBlock; |