std::numeric_limits::min() is used to initialize maximum value variables that should grow to the highest encountered value. It represents the smallest positive normal double, so this value can never grow negative (e. g. for only negative inputs). Use std::numeric_limits::lowest() istead.
Lines 199 and 200 of delaunator.cpp:
double max_x = (std::numeric_limits<double>::min)();double max_y = (std::numeric_limits<double>::min)();
should be:
double max_x = std::numeric_limits<double>::lowest();double max_y = std::numeric_limits<double>::lowest();
std::numeric_limits::min() is used to initialize maximum value variables that should grow to the highest encountered value. It represents the smallest positive normal double, so this value can never grow negative (e. g. for only negative inputs). Use std::numeric_limits::lowest() istead.
Lines 199 and 200 of delaunator.cpp:
double max_x = (std::numeric_limits<double>::min)();
double max_y = (std::numeric_limits<double>::min)();
should be:
double max_x = std::numeric_limits<double>::lowest();
double max_y = std::numeric_limits<double>::lowest();