aboutsummaryrefslogtreecommitdiff
path: root/tests/validation/FixedPoint.h
diff options
context:
space:
mode:
Diffstat (limited to 'tests/validation/FixedPoint.h')
-rw-r--r--tests/validation/FixedPoint.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/validation/FixedPoint.h b/tests/validation/FixedPoint.h
index 53f532cd8c..261fcd6df6 100644
--- a/tests/validation/FixedPoint.h
+++ b/tests/validation/FixedPoint.h
@@ -333,7 +333,7 @@ struct constant_expr
*/
static constexpr T to_fixed(float val, uint8_t p)
{
- return static_cast<T>(val * fixed_one(p) + ((val >= 0) ? 0.5 : -0.5));
+ return static_cast<T>(saturate_cast<float>(val * fixed_one(p) + ((val >= 0) ? 0.5 : -0.5)));
}
/** Clamp value between two ranges
*