mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-11-14 20:57:10 +00:00
embeddings:: simplifications
This commit is contained in:
@@ -1307,7 +1307,6 @@ EX hyperpoint scale_point(const hyperpoint& h, ld scale_factor) {
|
||||
}
|
||||
|
||||
EX transmatrix orthogonal_move(const transmatrix& t, double level) {
|
||||
if(gproduct && !cgi.emb->is_euc_in_product()) return scale_matrix(t, exp(level));
|
||||
if(GDIM == 3) return t * lzpush(level);
|
||||
return scale_matrix(t, geom3::lev_to_factor(level));
|
||||
}
|
||||
@@ -1316,6 +1315,12 @@ EX shiftmatrix orthogonal_move(const shiftmatrix& t, double level) {
|
||||
return shiftless(orthogonal_move(t.T, level), t.shift);
|
||||
}
|
||||
|
||||
/** fix a 3x3 matrix into a 4x4 matrix */
|
||||
EX transmatrix fix4(transmatrix t) {
|
||||
for(int i=0; i<4; i++) t[3][i] = t[i][3] = i == 3;
|
||||
return t;
|
||||
}
|
||||
|
||||
EX transmatrix xyscale(const transmatrix& t, double fac) {
|
||||
transmatrix res;
|
||||
for(int i=0; i<MXDIM; i++) {
|
||||
|
||||
Reference in New Issue
Block a user