1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-11-30 14:04:30 +00:00

Use uniform_real_distribution for agent half extents

They have float type.
This commit is contained in:
elsid 2025-11-19 20:17:19 +01:00
parent c06f94fee8
commit d7db0d3d46
No known key found for this signature in database
GPG key ID: B845CB9FEE18AB40

View file

@ -33,7 +33,7 @@ namespace
osg::Vec3f generateAgentHalfExtents(float min, float max, auto& random) osg::Vec3f generateAgentHalfExtents(float min, float max, auto& random)
{ {
std::uniform_int_distribution<int> distribution(min, max); std::uniform_real_distribution<float> distribution(min, max);
return osg::Vec3f(distribution(random), distribution(random), distribution(random)); return osg::Vec3f(distribution(random), distribution(random), distribution(random));
} }