From de73d25e0b27f4bee2de116d19cab32800785d64 Mon Sep 17 00:00:00 2001 From: Daniel Wilhelm Date: Fri, 2 Oct 2015 14:56:07 +0200 Subject: 7.2 --- wx+/graph.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'wx+/graph.cpp') 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; -- cgit