mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2024-12-29 19:40:35 +00:00
refactored binarytiling::parabolic to parabolic1 in hyperpoint
This commit is contained in:
parent
8866bc889d
commit
c45fa9bd9a
@ -148,8 +148,7 @@ namespace binary {
|
||||
}
|
||||
|
||||
transmatrix parabolic(ld u) {
|
||||
u = u * vid.binary_width / log(2);
|
||||
return transmatrix {{{-u*u/8+1, u/2, u*u/8}, {-u/2, 1, u/2}, {-u*u/8, u/2, u*u/8+1}}};
|
||||
return parabolic1(u * vid.binary_width / log(2) / 2);
|
||||
}
|
||||
|
||||
void draw() {
|
||||
|
@ -319,6 +319,10 @@ transmatrix ypush(ld alpha) {
|
||||
return T;
|
||||
}
|
||||
|
||||
transmatrix parabolic1(ld u) {
|
||||
return transmatrix {{{-u*u/2+1, u, u*u/2}, {-u, 1, u}, {-u*u/2, u, u*u/2+1}}};
|
||||
}
|
||||
|
||||
// rotate the hyperbolic plane around C0 such that H[1] == 0 and H[0] >= 0
|
||||
transmatrix spintox(const hyperpoint& H) {
|
||||
transmatrix T = Id;
|
||||
|
Loading…
Reference in New Issue
Block a user