1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2026-01-29 05:51:18 +00:00

azimuthal equivolume projection

This commit is contained in:
Zeno Rogue
2019-03-30 17:45:56 +01:00
parent 99dc6b8dd7
commit 2b61413a81
6 changed files with 19 additions and 4 deletions

View File

@@ -67,6 +67,15 @@ ld asin_auto(ld x) {
}
}
ld volume_auto(ld r) {
switch(cgclass) {
case gcEuclid: return 4 * r * r * r / 3 * M_PI;
case gcHyperbolic: return M_PI * (sinh(2*r) - 2 * r);
case gcSphere: return M_PI * (2 * r - sin(2*r));
default: return 0;
}
}
ld asin_auto_clamp(ld x) {
switch(cgclass) {
case gcEuclid: return x;