mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2024-12-24 01:00:25 +00:00
preliminary randomPointIn
This commit is contained in:
parent
13e5c3a555
commit
e72758c973
@ -356,6 +356,11 @@ transmatrix cellrelmatrix(cell *c, int i) {
|
||||
double randd() { return (rand() + .5) / (RAND_MAX + 1.); }
|
||||
|
||||
hyperpoint randomPointIn(int t) {
|
||||
if(irr::on || gp::on || archimedean) {
|
||||
// Let these geometries be less confusing.
|
||||
// Also easier to implement ;)
|
||||
return xspinpush0(2 * M_PI * randd(), asinh(randd() / 20));
|
||||
}
|
||||
while(true) {
|
||||
hyperpoint h = xspinpush0(2*M_PI*(randd()-.5)/t, asinh(randd()));
|
||||
double d =
|
||||
|
Loading…
Reference in New Issue
Block a user