From 308dbb8c6359589ce7411027cecd777938e40bd7 Mon Sep 17 00:00:00 2001 From: A Thousand Ships <96648715+AThousandShips@users.noreply.github.com> Date: Sun, 3 Mar 2024 14:37:52 +0100 Subject: [Core] Add scalar versions of `Vector*` `min/max/clamp/snap(ped)` Convenience for a number of cases operating on single values --- platform/linuxbsd/wayland/wayland_thread.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'platform/linuxbsd/wayland/wayland_thread.cpp') diff --git a/platform/linuxbsd/wayland/wayland_thread.cpp b/platform/linuxbsd/wayland/wayland_thread.cpp index 3a63b87c7a..1701aa650d 100644 --- a/platform/linuxbsd/wayland/wayland_thread.cpp +++ b/platform/linuxbsd/wayland/wayland_thread.cpp @@ -2461,7 +2461,7 @@ void WaylandThread::_wp_tablet_tool_on_frame(void *data, struct zwp_tablet_tool_ // According to the tablet proto spec, tilt is expressed in degrees relative // to the Z axis of the tablet, so it shouldn't go over 90 degrees either way, // I think. We'll clamp it just in case. - td.tilt = td.tilt.clamp(Vector2(-90, -90), Vector2(90, 90)); + td.tilt = td.tilt.clampf(-90, 90); mm->set_tilt(td.tilt / 90); -- cgit v1.2.3