Fix division by zero

This commit is contained in:
Néstor Subirón 2020-05-28 17:14:17 +02:00 committed by bernat
parent 5c433cae78
commit 15c250ad2a
1 changed files with 1 additions and 1 deletions

View File

@ -57,7 +57,7 @@ namespace detail {
}
static inline float fps(float milliseconds) {
return 1e3f / milliseconds;
return milliseconds > 0.0f ? (1e3f / milliseconds) : std::numeric_limits<float>::max();
}
const std::string _name;