diff options
author | B Stack <bgstack15@gmail.com> | 2021-02-02 11:44:31 -0500 |
---|---|---|
committer | B Stack <bgstack15@gmail.com> | 2021-02-02 11:44:31 -0500 |
commit | d299ddd2f27a437f0fc0cb49abdfd6dd8e3d94f8 (patch) | |
tree | 4d7c950512836f473a6a8cbb521c61e800db6584 /wx+/graph.cpp | |
parent | Merge branch '11.5' into 'master' (diff) | |
download | FreeFileSync-d299ddd2f27a437f0fc0cb49abdfd6dd8e3d94f8.tar.gz FreeFileSync-d299ddd2f27a437f0fc0cb49abdfd6dd8e3d94f8.tar.bz2 FreeFileSync-d299ddd2f27a437f0fc0cb49abdfd6dd8e3d94f8.zip |
add upstream 11.6
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: |