From 2522b16e5569cf4e476fd96cd0beede9a6f7b76d Mon Sep 17 00:00:00 2001 From: Zeno Rogue Date: Sun, 11 Sep 2022 13:44:28 +0200 Subject: [PATCH] renamed flatresult to cross_result --- rogueviz/ads/display.cpp | 10 +++++----- rogueviz/ads/map.cpp | 4 ++-- rogueviz/ads/math.cpp | 6 +++--- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/rogueviz/ads/display.cpp b/rogueviz/ads/display.cpp index fc391a06..9f1166af 100644 --- a/rogueviz/ads/display.cpp +++ b/rogueviz/ads/display.cpp @@ -2,7 +2,7 @@ namespace hr { namespace ads_game { -flatresult findflat(shiftpoint h) { +cross_result findflat(shiftpoint h) { return cross0(current * rgpushxto0(h)); } @@ -11,8 +11,8 @@ void draw_game_cell(cell *cs, ads_matrix V, ld plev) { adjust_to_zero(V, g, plev); auto c = g.first; - flatresult center; - vector hlist; + cross_result center; + vector hlist; hybrid::in_actual([&]{ for(int i=0; i<=c->type; i++) { @@ -106,7 +106,7 @@ void draw_game_cell(cell *cs, ads_matrix V, ld plev) { for(int i=0; i pts; + cross_result pt_main; + vector pts; ads_object(eObjType t, cell *_owner, const ads_matrix& T, color_t _col) : type(t), owner(_owner), at(T), col(_col) { life_start = -HUGE_VAL; diff --git a/rogueviz/ads/math.cpp b/rogueviz/ads/math.cpp index 77bdecf8..b81a88d6 100644 --- a/rogueviz/ads/math.cpp +++ b/rogueviz/ads/math.cpp @@ -104,7 +104,7 @@ ads_matrix ads_inverse(const ads_matrix& T) { return res; } -struct flatresult { +struct cross_result { hyperpoint h; ld shift; }; @@ -115,7 +115,7 @@ extern ads_matrix current; * shift is T's proper time at the point of crossing, and h=(x,y,z) is the Minkowski hyperboloid point where it crosses. **/ -flatresult cross0(ads_matrix hz) { +cross_result cross0(ads_matrix hz) { transmatrix deg90 = chg_shift(90*degree); hyperpoint uhz = unshift(hz * C0); @@ -142,7 +142,7 @@ flatresult cross0(ads_matrix hz) { tie(uhzt[2], uhzt[3]) = make_pair(uhzt[3], -uhzt[2]); t += get_shift_cycles(-hz.shift-t); - return flatresult{uhzt, t}; + return cross_result{uhzt, t}; } /** sample from Poisson distribution */