Skip to content
Snippets Groups Projects
Commit f5331143 authored by Raphael Grimm's avatar Raphael Grimm
Browse files

Fix index off by one

parent cb6dac56
No related branches found
No related tags found
No related merge requests found
......@@ -70,7 +70,7 @@ namespace VirtualRobot
{
return Eigen::Vector3f::Zero();
}
std::uniform_int_distribution<std::size_t> d{0, faces.size()};
std::uniform_int_distribution<std::size_t> d{0, faces.size() - 1};
const auto& f = faces.at(d(gen));
const float f0 = 1 + d(gen);
const float f1 = 1 + d(gen);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment