mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-01-26 17:06:59 +00:00
new hypot functions in goldberg
This commit is contained in:
parent
41c3bd9b58
commit
a0bd6bf4b5
@ -284,7 +284,7 @@ namespace geom3 {
|
|||||||
ld actual_wall_height() {
|
ld actual_wall_height() {
|
||||||
#if CAP_GP
|
#if CAP_GP
|
||||||
if(GOLDBERG && gp_autoscale_heights)
|
if(GOLDBERG && gp_autoscale_heights)
|
||||||
return wall_height * min<ld>(4 / hypot2(gp::next), 1);
|
return wall_height * min<ld>(4 / hypot_d(2, gp::next), 1);
|
||||||
#endif
|
#endif
|
||||||
return wall_height;
|
return wall_height;
|
||||||
}
|
}
|
||||||
|
@ -565,7 +565,7 @@ namespace hr { namespace gp {
|
|||||||
else
|
else
|
||||||
area = x * x + y * y;
|
area = x * x + y * y;
|
||||||
next = point3(x+y/2., -y * sqrt(3) / 2, 0);
|
next = point3(x+y/2., -y * sqrt(3) / 2, 0);
|
||||||
ld scale = 1 / hypot2(next);
|
ld scale = 1 / hypot_d(2, next);
|
||||||
crossf *= scale;
|
crossf *= scale;
|
||||||
hepvdist *= scale;
|
hepvdist *= scale;
|
||||||
hexhexdist *= scale;
|
hexhexdist *= scale;
|
||||||
|
Loading…
Reference in New Issue
Block a user