mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-16 22:27:20 +02:00
Fixed build for Linux.
This commit is contained in:
parent
32e47c24b4
commit
8d72026cbd
1 changed files with 3 additions and 3 deletions
|
@ -308,12 +308,12 @@ void OverlayWidget::RendererGL::paintTransformedContent(
|
|||
const auto rect = transformRect(geometry.rect);
|
||||
const auto centerx = rect.x() + rect.width() / 2;
|
||||
const auto centery = rect.y() + rect.height() / 2;
|
||||
const auto rsin = std::sinf(geometry.rotation * M_PI / 180.);
|
||||
const auto rcos = std::cosf(geometry.rotation * M_PI / 180.);
|
||||
const auto rsin = float(std::sin(geometry.rotation * M_PI / 180.));
|
||||
const auto rcos = float(std::cos(geometry.rotation * M_PI / 180.));
|
||||
const auto rotated = [&](float x, float y) -> std::array<float, 2> {
|
||||
x -= centerx;
|
||||
y -= centery;
|
||||
return {
|
||||
return std::array<float, 2>{
|
||||
centerx + (x * rcos + y * rsin),
|
||||
centery + (y * rcos - x * rsin)
|
||||
};
|
||||
|
|
Loading…
Add table
Reference in a new issue