mirror of
https://github.com/overte-org/overte.git
synced 2025-07-17 20:16:43 +02:00
use clamp instead of min, max
This commit is contained in:
parent
8f1ff46fa7
commit
26618f45f8
1 changed files with 2 additions and 5 deletions
|
@ -2114,11 +2114,8 @@ void Application::updateAvatar(float deltaTime) {
|
|||
}
|
||||
|
||||
// Constrain head-driven mouse to edges of screen
|
||||
_headMouseX = max(_headMouseX, 0);
|
||||
_headMouseX = min(_headMouseX, _glWidget->width());
|
||||
_headMouseY = max(_headMouseY, 0);
|
||||
_headMouseY = min(_headMouseY, _glWidget->height());
|
||||
|
||||
_headMouseX = glm::clamp(_headMouseX, 0, _glWidget->width());
|
||||
_headMouseY = glm::clamp(_headMouseY, 0, _glWidget->height());
|
||||
|
||||
if (OculusManager::isConnected()) {
|
||||
float yaw, pitch, roll;
|
||||
|
|
Loading…
Reference in a new issue