From d4d799cac8080d4066394f338c31611ae655d5f6 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Sun, 26 Sep 2021 20:56:25 +0200 Subject: compat: use std::clamp, remove own version --- proto-vjoystick/vjoystick.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'proto-vjoystick') 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; -- cgit v1.2.3