mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2024-12-24 17:10:36 +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.); }
|
double randd() { return (rand() + .5) / (RAND_MAX + 1.); }
|
||||||
|
|
||||||
hyperpoint randomPointIn(int t) {
|
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) {
|
while(true) {
|
||||||
hyperpoint h = xspinpush0(2*M_PI*(randd()-.5)/t, asinh(randd()));
|
hyperpoint h = xspinpush0(2*M_PI*(randd()-.5)/t, asinh(randd()));
|
||||||
double d =
|
double d =
|
||||||
|
Loading…
Reference in New Issue
Block a user