summaryrefslogtreecommitdiffhomepage
path: root/proto-vjoystick
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2021-09-26 20:56:25 +0200
committerStanislaw Halik <sthalik@misaki.pl>2021-09-26 21:10:13 +0200
commitd4d799cac8080d4066394f338c31611ae655d5f6 (patch)
treeff37ab02c0bc8aaf30f44ad4c217527df74a774f /proto-vjoystick
parentcecd3f8a89693c5722b5e52baebb58edaef1a91c (diff)
compat: use std::clamp, remove own version
Diffstat (limited to 'proto-vjoystick')
-rw-r--r--proto-vjoystick/vjoystick.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/proto-vjoystick/vjoystick.cpp b/proto-vjoystick/vjoystick.cpp
index 2962a393..292e8259 100644
--- a/proto-vjoystick/vjoystick.cpp
+++ b/proto-vjoystick/vjoystick.cpp
@@ -88,7 +88,7 @@ int vjoystick::to_axis_value(unsigned axis_id, double val) const
const double min = axis_min[axis_id];
const double max = axis_max[axis_id];
- return (int)(clamp((val+minmax) * max / (2*minmax) - min, min, max));
+ return (int)(std::clamp((val+minmax) * max / (2*minmax) - min, min, max));
}
vjoystick::vjoystick() = default;