1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2025-11-20 23:54:49 +00:00

convenience functions zforward_dir and zpush0

This commit is contained in:
Zeno Rogue
2019-08-20 14:56:00 +02:00
parent afa6d722dd
commit 201098efe9
4 changed files with 5 additions and 3 deletions

View File

@@ -7227,9 +7227,9 @@ EX void precise_mouseover() {
mouseover2 = mouseover = viewcenter();
ld best = HUGE_VAL;
hyperpoint h =
prod ? product::direct_exp( inverse(nisot::local_perspective) * cspin(2, 0, M_PI/2) * forward_dir(1) ) :
prod ? product::direct_exp( inverse(nisot::local_perspective) * zforward_dir(1) ) :
nisot::local_perspective_used() ? inverse(nisot::local_perspective) * cpush(2, 1) * C0 : cpush(2, 1) * C0;
nisot::local_perspective_used() ? inverse(nisot::local_perspective) * zpush0(1) : zpush0(1);
forCellEx(c1, mouseover2) {
ld dist = hdist(tC0(ggmatrix(c1)), h);
if(dist < best) mouseover = c1, best = dist;