diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/gui/rgba.hpp | 2 | ||||
-rw-r--r-- | src/server/internals/Controller.cpp | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/gui/rgba.hpp b/src/gui/rgba.hpp index 949a80d7..ffd63f82 100644 --- a/src/gui/rgba.hpp +++ b/src/gui/rgba.hpp @@ -34,7 +34,7 @@ rgba_to_uint(uint8_t r, uint8_t g, uint8_t b, uint8_t a) static inline uint8_t mono_interpolate(uint8_t v1, uint8_t v2, float f) { - return static_cast<int>(rint((v2) * (f) + (v1) * (1 - (f)))); + return static_cast<int>(rintf((v2) * (f) + (v1) * (1 - (f)))); } #define RGBA_R(x) (static_cast<uint32_t>(x) >> 24) diff --git a/src/server/internals/Controller.cpp b/src/server/internals/Controller.cpp index 1a6bb483..a4f7ef43 100644 --- a/src/server/internals/Controller.cpp +++ b/src/server/internals/Controller.cpp @@ -160,8 +160,8 @@ ControllerNode::control(RunContext& context, uint8_t control_num, uint8_t val, F if (min_port_val < 0) { log_offset = fabs(min_port_val); } - const Sample min = log(min_port_val + 1 + log_offset); - const Sample max = log(max_port_val + 1 + log_offset); + const Sample min = logf(min_port_val + 1 + log_offset); + const Sample max = logf(max_port_val + 1 + log_offset); scaled_value = expf(nval * (max - min) + min) - 1 - log_offset; } else { scaled_value = ((nval) * (max_port_val - min_port_val)) + min_port_val; |