From bb3c9fb0d9a579bee23d16350b2a8040547ef18c Mon Sep 17 00:00:00 2001 From: Phuntsok Drak-pa Date: Sun, 28 Apr 2019 19:34:11 +0200 Subject: [PATCH] bug moved to other line --- src/shapes.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/shapes.cc b/src/shapes.cc index 3b497cc..e507b74 100644 --- a/src/shapes.cc +++ b/src/shapes.cc @@ -33,7 +33,7 @@ void Shape::update(cv::Point &&t_max_pos, int const t_max_size, { int const size = (rand() % (t_max_size - t_min_size)) + t_min_size + 1; cv::Point const top_left - = {rand() % (t_max_pos.x - size), rand() % (t_max_pos.y - size)}; + = {rand() % (t_max_pos.x - size + 1), rand() % (t_max_pos.y - size + 1)}; if (type_ == ShapeType::Triangle) { create_triangle_points(top_left, size); } else { // ShapeType::Square