From 12a1a03541bd17a2b7131a662e96fbe6add82ef2 Mon Sep 17 00:00:00 2001 From: Xun Li Date: Sat, 26 Mar 2022 15:35:13 -0700 Subject: [PATCH] fix cartogram initial canvas offset (#2377) --- Explore/CartogramNewView.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Explore/CartogramNewView.cpp b/Explore/CartogramNewView.cpp index cde7d0036..c2f145c88 100644 --- a/Explore/CartogramNewView.cpp +++ b/Explore/CartogramNewView.cpp @@ -22,6 +22,7 @@ #include #include #include +#include #include #include #include @@ -182,9 +183,9 @@ improve_table(6), realtime_updates(false), all_init(false) // Enable realtime_updates for future calls to ImproveAll realtime_updates = true; - double max_rad = DBL_MIN; - double min_out_x = DBL_MAX, max_out_x = DBL_MIN; - double min_out_y = DBL_MAX, max_out_y = DBL_MIN; + double max_rad = -std::numeric_limits::max(); + double min_out_x = std::numeric_limits::max(), max_out_x = -std::numeric_limits::max(); + double min_out_y = std::numeric_limits::max(), max_out_y = -std::numeric_limits::max(); for (int t=0; t