From deff5fda016a18fd1d5a8a2b6c0611245757aaff Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Mon, 27 Sep 2021 11:23:23 +0200 Subject: fix build harder, also accidental adl --- tracker-tobii/ftnoir_tracker_tobii.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'tracker-tobii') diff --git a/tracker-tobii/ftnoir_tracker_tobii.cpp b/tracker-tobii/ftnoir_tracker_tobii.cpp index 43cb1662..595cf410 100644 --- a/tracker-tobii/ftnoir_tracker_tobii.cpp +++ b/tracker-tobii/ftnoir_tracker_tobii.cpp @@ -23,9 +23,9 @@ void tobii::data(double *data) else { center_pose = p; } - data[0] = clamp(p.position_xyz[0] * 30.0 / 300.0, -30.0, 30.0); - data[1] = clamp(p.position_xyz[1] * 30.0 / 300.0, -30.0, 30.0); - data[2] = clamp(p.position_xyz[2] * 30.0 / 300.0, -30.0, 30.0); + data[0] = std::clamp(p.position_xyz[0] * 30.0 / 300.0, -30.0, 30.0); + data[1] = std::clamp(p.position_xyz[1] * 30.0 / 300.0, -30.0, 30.0); + data[2] = std::clamp(p.position_xyz[2] * 30.0 / 300.0, -30.0, 30.0); } double max_yaw = 90.0; @@ -33,7 +33,7 @@ void tobii::data(double *data) if (center_pose.rotation_validity_xyz[1] == TOBII_VALIDITY_VALID) { p.rotation_xyz[1] = p.rotation_xyz[1] - center_pose.rotation_xyz[1]; } - data[3] = clamp(p.rotation_xyz[1] * 100.0 * max_yaw / 90.0, -max_yaw, max_yaw); + data[3] = std::clamp(p.rotation_xyz[1] * 100.0 * max_yaw / 90.0, -max_yaw, max_yaw); } double max_pitch = 90.0; @@ -41,7 +41,7 @@ void tobii::data(double *data) if (center_pose.rotation_validity_xyz[0] == TOBII_VALIDITY_VALID) { p.rotation_xyz[0] = p.rotation_xyz[0] - center_pose.rotation_xyz[0]; } - data[4] = clamp(p.rotation_xyz[0] * 100.0 * max_pitch / 90.0, -max_pitch, max_pitch); + data[4] = std::clamp(p.rotation_xyz[0] * 100.0 * max_pitch / 90.0, -max_pitch, max_pitch); } double max_roll = 90.0; @@ -49,7 +49,7 @@ void tobii::data(double *data) if (center_pose.rotation_validity_xyz[2] == TOBII_VALIDITY_VALID) { p.rotation_xyz[2] = p.rotation_xyz[2] - center_pose.rotation_xyz[2]; } - data[5] = clamp(p.rotation_xyz[2] * 100.0 * max_roll / 90.0, -max_roll, max_roll); + data[5] = std::clamp(p.rotation_xyz[2] * 100.0 * max_roll / 90.0, -max_roll, max_roll); } } } -- cgit v1.2.3