From e72758c97303c5ef8da7732af337850b1db6fd54 Mon Sep 17 00:00:00 2001 From: Zeno Rogue Date: Mon, 20 Aug 2018 16:36:45 +0200 Subject: [PATCH] preliminary randomPointIn --- geometry2.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/geometry2.cpp b/geometry2.cpp index caa8c9fd..3fe3a1c5 100644 --- a/geometry2.cpp +++ b/geometry2.cpp @@ -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 =