diff options
author | B Stack <bgstack15@gmail.com> | 2021-02-02 21:49:34 +0000 |
---|---|---|
committer | B Stack <bgstack15@gmail.com> | 2021-02-02 21:49:34 +0000 |
commit | 26b8bd6eb07b78adad36049e03494a2931b231af (patch) | |
tree | 4d7c950512836f473a6a8cbb521c61e800db6584 /wx+/graph.cpp | |
parent | Merge branch '11.5' into 'master' (diff) | |
parent | add upstream 11.6 (diff) | |
download | FreeFileSync-26b8bd6eb07b78adad36049e03494a2931b231af.tar.gz FreeFileSync-26b8bd6eb07b78adad36049e03494a2931b231af.tar.bz2 FreeFileSync-26b8bd6eb07b78adad36049e03494a2931b231af.zip |
Merge branch '11.6' into 'master'11.6
add upstream 11.6
See merge request opensource-tracking/FreeFileSync!30
Diffstat (limited to 'wx+/graph.cpp')
-rw-r--r-- | wx+/graph.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/wx+/graph.cpp b/wx+/graph.cpp index bb320db6..ba87299e 100644 --- a/wx+/graph.cpp +++ b/wx+/graph.cpp @@ -87,7 +87,7 @@ public: { //catch large double values: if double is larger than what int can represent => undefined behavior! realPos = std::clamp(realPos, outOfBoundsLow_, outOfBoundsHigh_); - return numeric::round(realToScreen(realPos)); + return std::round(realToScreen(realPos)); } private: @@ -123,7 +123,7 @@ 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); + int blockCount = std::round(blockMax - blockMin); assert(blockCount >= 0); //handle valMin == valMax == integer @@ -770,10 +770,10 @@ void Graph2D::render(wxDC& dc) const screenToX = std::clamp(screenToX, 0.0, graphArea.width - 1.0); screenToY = std::clamp(screenToY, 0.0, graphArea.height - 1.0); - const wxPoint pixelFrom = wxPoint(numeric::round(screenFromX), - numeric::round(screenFromY)) + graphAreaOrigin; - const wxPoint pixelTo = wxPoint(numeric::round(screenToX), - numeric::round(screenToY)) + graphAreaOrigin; + const wxPoint pixelFrom = wxPoint(std::round(screenFromX), + std::round(screenFromY)) + graphAreaOrigin; + const wxPoint pixelTo = wxPoint(std::round(screenToX), + std::round(screenToY)) + graphAreaOrigin; switch (attr_.mouseSelMode) { case GraphSelMode::none: |