mirror of
https://gitlab.com/dosowisko.net/libsuperderpy.git
synced 2024-12-12 20:18:00 +01:00
particle: explicitly cast RAND_MAX to float
This silences a warning in clang-11
This commit is contained in:
parent
b592a3382f
commit
4fe091d93c
1 changed files with 1 additions and 1 deletions
|
@ -144,7 +144,7 @@ SYMBOL_EXPORT struct ParticleState SpawnParticleIn(float x, float y) {
|
|||
}
|
||||
|
||||
SYMBOL_EXPORT struct ParticleState SpawnParticleBetween(float x1, float y1, float x2, float y2) {
|
||||
float x = x1 + (x2 - x1) * rand() / RAND_MAX, y = y1 + (y2 - y1) * rand() / RAND_MAX;
|
||||
float x = x1 + (x2 - x1) * rand() / (float)RAND_MAX, y = y1 + (y2 - y1) * rand() / (float)RAND_MAX;
|
||||
return SpawnParticleIn(x, y);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue