From 998cdceb16602d0e5938f1044f885d0ad969cc25 Mon Sep 17 00:00:00 2001 From: Love Billenius Date: Mon, 29 Jan 2024 12:45:32 +0100 Subject: [PATCH] no more top to bottom super bumps --- src/Vec2d/Vec2d.h | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/Vec2d/Vec2d.h b/src/Vec2d/Vec2d.h index 331dab9..798718d 100644 --- a/src/Vec2d/Vec2d.h +++ b/src/Vec2d/Vec2d.h @@ -30,10 +30,11 @@ public: std::uniform_int_distribution ints(0, 1); int sign = ints(mtRand) ? -1 : 1; - std::uniform_real_distribution angleGen(3, 60); - double_t angle = toRadians(angleGen(mtRand)); - x = cos(angle) * sign * hypotenuse; - y = sin(angle) * sign * hypotenuse; + std::uniform_real_distribution angleGen(15, 75); + double_t degrees = angleGen(mtRand); + double_t angle = toRadians(degrees); + x = sin(angle) * sign * hypotenuse; + y = cos(angle) * sign * hypotenuse; smallAngleGen = std::uniform_real_distribution(15, 20); }