mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2024-12-21 08:00:25 +00:00
inverse_exp more precise for very small vectors
This commit is contained in:
parent
8bdf5aa404
commit
ac54fe909d
@ -1468,6 +1468,8 @@ constexpr flagtype pNORMAL = 0;
|
|||||||
EX hyperpoint inverse_exp(const shiftpoint h, flagtype prec IS(pNORMAL)) {
|
EX hyperpoint inverse_exp(const shiftpoint h, flagtype prec IS(pNORMAL)) {
|
||||||
#if CAP_SOLV
|
#if CAP_SOLV
|
||||||
if(sn::in()) {
|
if(sn::in()) {
|
||||||
|
/* this will be more precise for use in set_view in intra */
|
||||||
|
if(sqhypot_d(3, h.h) < 2e-9) return h.h - C0;
|
||||||
if(nih)
|
if(nih)
|
||||||
return sn::get_inverse_exp_nsym(h.h, prec);
|
return sn::get_inverse_exp_nsym(h.h, prec);
|
||||||
else
|
else
|
||||||
|
Loading…
Reference in New Issue
Block a user