mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 17:27:35 +00:00
Everywhere: Add -Wdouble-promotion
warning
This warning informs of float-to-double conversions. The best solution seems to be to do math *either* in 32-bit *or* in 64-bit, and only to cross over when absolutely necessary.
This commit is contained in:
parent
6606d70826
commit
73dd293ec4
26 changed files with 105 additions and 98 deletions
|
@ -92,7 +92,7 @@ void SolitaireWidget::create_new_animation_card()
|
|||
card->set_position({ rand() % (SolitaireWidget::width - Card::width), rand() % (SolitaireWidget::height / 8) });
|
||||
|
||||
int x_sgn = card->position().x() > (SolitaireWidget::width / 2) ? -1 : 1;
|
||||
m_animation = Animation(card, rand_float() + .4, x_sgn * ((rand() % 3) + 2), .6 + rand_float() * .4);
|
||||
m_animation = Animation(card, rand_float() + .4f, x_sgn * ((rand() % 3) + 2), .6f + rand_float() * .4f);
|
||||
}
|
||||
|
||||
void SolitaireWidget::start_game_over_animation()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue