const Style ImageStyle =
{
.Width = static_cast<int>(_height * 0.75),
.Height = _height,
.Background = Colors::Green,
.BackgroundOnHover = Colors::Lightgreen
};
_height
и
Width
- типа int.
А вот другой пример, где нету ошибки.
SDL_Point newPosition;
const auto [x, y] = GetRotationCenter(_type);
const auto cos90 = cos(std::numbers::pi / 2);
const auto sin90 = sin(std::numbers::pi / 2);
for(auto& cell : _cells)
{
newPosition.x = (cell.Position.x - x) * cos90 - (cell.Position.y - y) * sin90 + x;
newPosition.y = (cell.Position.x - x) * sin90 + (cell.Position.y - y) * cos90 + y;
cell.Position = newPosition;
}
Тут
newPosition.x
и
newPosition.y
- int, а
cos90
и
sin90
- double