mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2026-10-29 12:04:30 +00:00
2d3d:: better radar in sphere, also better sin/cos in general
This commit is contained in:
1 parent
1769f65ddb
commit
dec0d191a8
2 files changed
+23
-5
No files matched your search
@@ -721,6 +721,12 @@ void addradar(const transmatrix& V, char ch, color_t col, color_t outline) {
|
||||
h[0] = h[0] / (1 + h[3]);
|
||||
h[2] = 0;
|
||||
}
|
||||
else if(sphere) {
|
||||
ld z = h[2] + h[1]/1000000;
|
||||
h[1] = hypot(h[2], h[1]);
|
||||
if(z < 0) h[1] = -h[1];
|
||||
h[2] = h[3];
|
||||
}
|
||||
else {
|
||||
ld z = h[2] + h[1]/1000000;
|
||||
if(d) h = h * (d / sightranges[geometry] / hypot_d(3, h));
|
||||
|
||||
Reference in new issue
Block a user