1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2025-09-01 18:27:55 +00:00

refactored the vertical movement functions

This commit is contained in:
Zeno Rogue
2022-12-06 01:04:26 +01:00
parent adfab30c62
commit bf001926c2
12 changed files with 210 additions and 181 deletions

View File

@@ -96,11 +96,11 @@ void geometry_information::add_prism(ld z0, vector<hyperpoint> vh0, ld z1, vecto
}
void geometry_information::shift_last(ld z) {
for(int i=last->s; i<isize(hpc); i++) hpc[i] = zshift(hpc[i], z);
for(int i=last->s; i<isize(hpc); i++) hpc[i] = lzpush(z) * hpc[i];
}
void geometry_information::shift_shape(hpcshape& sh, ld z) {
for(int i=sh.s; i<sh.e; i++) hpc[i] = zshift(hpc[i], z);
for(int i=sh.s; i<sh.e; i++) hpc[i] = lzpush(z) * hpc[i];
}
void geometry_information::shift_shape_orthogonally(hpcshape& sh, ld z) {