From a0bd6bf4b5b518b5b76f876378dbf7588ed64cf5 Mon Sep 17 00:00:00 2001 From: ? Date: Wed, 27 Feb 2019 23:41:28 +0100 Subject: [PATCH] new hypot functions in goldberg --- geometry.cpp | 2 +- goldberg.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/geometry.cpp b/geometry.cpp index 8942bc80..36ac9a4b 100644 --- a/geometry.cpp +++ b/geometry.cpp @@ -284,7 +284,7 @@ namespace geom3 { ld actual_wall_height() { #if CAP_GP if(GOLDBERG && gp_autoscale_heights) - return wall_height * min(4 / hypot2(gp::next), 1); + return wall_height * min(4 / hypot_d(2, gp::next), 1); #endif return wall_height; } diff --git a/goldberg.cpp b/goldberg.cpp index b2311883..d2687725 100644 --- a/goldberg.cpp +++ b/goldberg.cpp @@ -565,7 +565,7 @@ namespace hr { namespace gp { else area = x * x + y * y; next = point3(x+y/2., -y * sqrt(3) / 2, 0); - ld scale = 1 / hypot2(next); + ld scale = 1 / hypot_d(2, next); crossf *= scale; hepvdist *= scale; hexhexdist *= scale;