diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2021-09-27 11:23:23 +0200 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2021-09-27 11:23:23 +0200 |
commit | deff5fda016a18fd1d5a8a2b6c0611245757aaff (patch) | |
tree | 7e08b3e3d6bd42530452ca325a4038832f8ac000 /tracker-tobii | |
parent | 3f88462ff3c9e21c9c41e0041c861c64c1336344 (diff) |
fix build harder, also accidental adl
Diffstat (limited to 'tracker-tobii')
-rw-r--r-- | tracker-tobii/ftnoir_tracker_tobii.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
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); } } } |