bug moved to other line

This commit is contained in:
Phuntsok Drak-pa 2019-04-28 19:34:11 +02:00
parent 451a55a6df
commit bb3c9fb0d9
1 changed files with 1 additions and 1 deletions

View File

@ -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