Skip to content

Commit

Permalink
MBS-8483: Use intval instead of (int)round(...)
Browse files Browse the repository at this point in the history
  • Loading branch information
PhMemmel committed Jan 17, 2024
1 parent 22b32f2 commit 8a9cd63
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion question.php
Original file line number Diff line number Diff line change
Expand Up @@ -587,7 +587,7 @@ public static function randomize_vars(array &$vars, array $inequalities, $timeli
* @return int|float Random number in the set {x| $min <= x <= $max, x = $min + n * $increment, n ∈ N}
*/
public static function random_incremented_value($min, $max, $increment) {
return $min + mt_rand(0, (int)round(($max - $min) / $increment)) * $increment;
return $min + mt_rand(0, intval(($max - $min) / $increment)) * $increment;
}

/**
Expand Down

0 comments on commit 8a9cd63

Please sign in to comment.