1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2024-09-19 10:19:36 +00:00

dont_fixmatrix flag

This commit is contained in:
Zeno Rogue 2024-06-27 22:26:18 +02:00
parent c763eb0a44
commit 8671b830cc

View File

@ -993,6 +993,8 @@ EX shiftmatrix rgpushxto0(const shiftpoint& H) {
return shiftless(rgpushxto0(H.h), H.shift);
}
EX bool dont_fixmatrix;
/** \brief Fix the numerical inaccuracies in the isometry T
*
* The nature of hyperbolic geometry makes the computations numerically unstable.
@ -1001,7 +1003,8 @@ EX shiftmatrix rgpushxto0(const shiftpoint& H) {
*/
EX void fixmatrix(transmatrix& T) {
if(nonisotropic) ; // T may be inverse... do not do that
if(dont_fixmatrix) return;
else if(nonisotropic) ; // T may be inverse... do not do that
else if(cgflags & qAFFINE) ; // affine
else if(gproduct) {
auto z = zlevel(tC0(T));