mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-14 22:42:14 -07:00
Use qSin instead of sin
Fix build failures with old GCC.
This commit is contained in:
parent
f5080424a6
commit
e7b28322c1
1 changed files with 2 additions and 2 deletions
|
|
@ -29,8 +29,8 @@ QColor CardCounterSettings::color(int counterId) const
|
||||||
} else {
|
} else {
|
||||||
// Future-proof support for more counters with pseudo-random colors
|
// Future-proof support for more counters with pseudo-random colors
|
||||||
int h = (counterId * 37) % 360;
|
int h = (counterId * 37) % 360;
|
||||||
int s = 128 + 64 * sin((counterId * 97) * 0.1); // 64-192
|
int s = 128 + 64 * qSin((counterId * 97) * 0.1); // 64-192
|
||||||
int v = 196 + 32 * sin((counterId * 101) * 0.07); // 164-228
|
int v = 196 + 32 * qSin((counterId * 101) * 0.07); // 164-228
|
||||||
|
|
||||||
defaultColor = QColor::fromHsv(h, s, v);
|
defaultColor = QColor::fromHsv(h, s, v);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue