1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2025-10-22 09:27:40 +00:00

fixed raycaster in twisted geometries; weirdly twisted spherical geometry

This commit is contained in:
Zeno Rogue
2020-08-08 16:08:51 +02:00
parent 191ef35d21
commit 0926b98c83
3 changed files with 236 additions and 47 deletions

View File

@@ -1300,7 +1300,7 @@ EX hyperpoint tangent_length(hyperpoint dir, ld length) {
EX hyperpoint direct_exp(hyperpoint v) {
if(sn::in()) return nisot::numerical_exp(v);
if(nil) return nilv::formula_exp(v);
if(sl2 || stretch::in()) return rots::formula_exp(v);
if(sl2 || stretch::in()) return stretch::mstretch ? nisot::numerical_exp(v) : rots::formula_exp(v);
if(prod) return product::direct_exp(v);
ld d = hypot_d(GDIM, v);
if(d > 0) for(int i=0; i<GDIM; i++) v[i] = v[i] * sin_auto(d) / d;