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

3D:: mscale performs zpush when in 3D

This commit is contained in:
?
2019-02-22 21:26:37 +01:00
committed by Zeno Rogue
parent d87a471714
commit c3edbc0247
2 changed files with 5 additions and 0 deletions

View File

@@ -603,6 +603,7 @@ double hdist(const hyperpoint& h1, const hyperpoint& h2) {
}
hyperpoint mscale(const hyperpoint& t, double fac) {
if(DIM == 3) return cpush(2, fac) * t;
hyperpoint res;
for(int i=0; i<MDIM; i++)
res[i] = t[i] * fac;
@@ -610,6 +611,7 @@ hyperpoint mscale(const hyperpoint& t, double fac) {
}
transmatrix mscale(const transmatrix& t, double fac) {
if(DIM == 3) return t * cpush(2, fac);
transmatrix res;
for(int i=0; i<MDIM; i++) for(int j=0; j<MDIM; j++)
res[i][j] = t[i][j] * fac;