interface/raypick: Fix -Wdouble-promotion.

This commit is contained in:
Lubosz Sarnecki 2024-08-03 14:01:33 +02:00
parent 91076e2000
commit e33a5006d5
2 changed files with 2 additions and 2 deletions

View file

@ -178,7 +178,7 @@ std::shared_ptr<PickQuery> PickScriptingInterface::buildRayPick(const QVariantMa
if (propMap["delay"].isValid()) {
// We want to be within 0.1% of the target in <delay> seconds
// https://twitter.com/FreyaHolmer/status/1757836988495847568
delayHalf = -std::max(propMap["delay"].toFloat(), 0.0f) / log2(0.001);
delayHalf = -std::max(propMap["delay"].toFloat(), 0.0f) / log2(0.001f);
}
auto rayPick = std::make_shared<RayPick>(position, direction, filter, maxDistance, delayHalf, enabled);

View file

@ -102,7 +102,7 @@ void RayPick::setDelay(float delay) {
withWriteLock([&] {
// We want to be within 0.1% of the target in <delay> seconds
// https://twitter.com/FreyaHolmer/status/1757836988495847568
_delayHalf = -std::max(delay, 0.0f) / log2(0.001);
_delayHalf = -std::max(delay, 0.0f) / log2(0.001f);
});
}