2d3d:: better radar in sphere, also better sin/cos in general

This commit is contained in:
Zeno Rogue committed 2019-09-12 22:50:00 +02:00
1 parent 1769f65ddb
commit dec0d191a8
2 files changed
+23 -5

No files matched your search

+6
View File
@@ -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));