mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2024-12-20 15:40:26 +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) {
|
transmatrix parabolic(ld u) {
|
||||||
u = u * vid.binary_width / log(2);
|
return parabolic1(u * vid.binary_width / log(2) / 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}}};
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void draw() {
|
void draw() {
|
||||||
|
@ -319,6 +319,10 @@ transmatrix ypush(ld alpha) {
|
|||||||
return T;
|
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
|
// rotate the hyperbolic plane around C0 such that H[1] == 0 and H[0] >= 0
|
||||||
transmatrix spintox(const hyperpoint& H) {
|
transmatrix spintox(const hyperpoint& H) {
|
||||||
transmatrix T = Id;
|
transmatrix T = Id;
|
||||||
|
Loading…
Reference in New Issue
Block a user