1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2024-12-29 19:40:35 +00:00

added some exports

This commit is contained in:
Zeno Rogue 2018-09-27 21:52:23 +02:00
parent 1ee6b1eace
commit 2bdda23bc8

View File

@ -551,7 +551,7 @@ struct cell : gcell {
// do not add any fields after connection_table (see tailored_alloc) // do not add any fields after connection_table (see tailored_alloc)
}; };
namespace arcm { int degree(heptagon *h); } namespace arcm { int degree(heptagon *h); int valence(); }
int heptagon::degree() { if(archimedean) return arcm::degree(this); else return S7; } int heptagon::degree() { if(archimedean) return arcm::degree(this); else return S7; }
@ -4152,6 +4152,10 @@ struct bignum {
return leading() * pow(BASE, isize(digits) - 1); return leading() * pow(BASE, isize(digits) - 1);
} }
ld log_approx() const {
return log(leading()) * log(BASE) * (isize(digits) - 1);
}
ld operator / (const bignum& b) const { ld operator / (const bignum& b) const {
return leading() / b.leading() * pow(BASE, isize(digits) - isize(b.digits)); return leading() / b.leading() * pow(BASE, isize(digits) - isize(b.digits));
} }