Decompile fn_18809 (RandomRange)
Batch #13244 by cremane: 1 byte-identical, 0 confirmed by peer review. - fn_18809 RandomRange: byte-identical Merged automatically: every function is byte-identical to the original.
This commit is contained in:
parent
4400332945
commit
99022bf990
1 changed files with 1 additions and 1 deletions
|
|
@ -86,7 +86,7 @@ float RandomRange(float minimum, float maximum) {
|
|||
|
||||
const int low = static_cast<int>(minimum * 10.0f);
|
||||
const int value = rand();
|
||||
const int span = std::abs(low + static_cast<int>(maximum * -10.0f)) + 1;
|
||||
const int span = std::abs(-low - static_cast<int>(maximum * -10.0f)) + 1;
|
||||
return static_cast<float>(value % span + low) * 0.1f;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue