Core: Use Math namespace for constants
This commit is contained in:
@ -5008,8 +5008,8 @@ LRESULT DisplayServerWindows::WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARA
|
||||
windows[window_id].last_pressure_update = 0;
|
||||
|
||||
float pressure = float(packet.pkNormalPressure - windows[window_id].min_pressure) / float(windows[window_id].max_pressure - windows[window_id].min_pressure);
|
||||
double azim = (packet.pkOrientation.orAzimuth / 10.0f) * (Math_PI / 180);
|
||||
double alt = Math::tan((Math::abs(packet.pkOrientation.orAltitude / 10.0f)) * (Math_PI / 180));
|
||||
double azim = (packet.pkOrientation.orAzimuth / 10.0f) * (Math::PI / 180);
|
||||
double alt = Math::tan((Math::abs(packet.pkOrientation.orAltitude / 10.0f)) * (Math::PI / 180));
|
||||
bool inverted = packet.pkStatus & TPS_INVERT;
|
||||
|
||||
Vector2 tilt = (windows[window_id].tilt_supported) ? Vector2(Math::atan(Math::sin(azim) / alt), Math::atan(Math::cos(azim) / alt)) : Vector2();
|
||||
|
||||
Reference in New Issue
Block a user