Change implicit conversion to explicit conversion to remove warning (#4308)
Some checks failed
Android / build (arm64) (push) Has been cancelled
Android / build (x86_64) (push) Has been cancelled
CMakeBuilds / Windows Build (push) Has been cancelled
CMakeBuilds / Linux Build (push) Has been cancelled
Linux / build (i386, i386, /user/bin, 32) (push) Has been cancelled
Linux / build (x86_64, amd64, /user/bin, 64) (push) Has been cancelled
Linux Examples / build (push) Has been cancelled
macOS / build (push) Has been cancelled
WebAssembly / build (push) Has been cancelled
Windows / build (i686, pe-i386, 32, mingw-w64) (push) Has been cancelled
Windows / build (x64, x64, 64, msvc16) (push) Has been cancelled
Windows / build (x86, Win32, 32, msvc16) (push) Has been cancelled
Windows / build (x86_64, pe-x86-64, 64, mingw-w64) (push) Has been cancelled
Windows Examples / build (push) Has been cancelled
CodeQL / Analyze (cpp) (push) Has been cancelled

This commit is contained in:
masnm 2024-09-07 03:16:17 +06:00 committed by GitHub
parent ed61bdb568
commit 10b01ba7c2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1130,7 +1130,7 @@ static par_shapes__rule* par_shapes__pick_rule(const char* name,
total += rule->weight;
}
}
float r = (float) rand() / RAND_MAX;
float r = (float) rand() / (float) RAND_MAX;
float t = 0;
for (int i = 0; i < nrules; i++) {
rule = rules + i;