public static function PHPExcel_Calculation_MathTrig::RAND in Loft Data Grids 7.2
Same name and namespace in other branches
- 6.2 vendor/phpoffice/phpexcel/Classes/PHPExcel/Calculation/MathTrig.php \PHPExcel_Calculation_MathTrig::RAND()
* RAND * *
Parameters
int $min Minimal value: * @param int $max Maximal value * @return int Random number
File
- vendor/
phpoffice/ phpexcel/ Classes/ PHPExcel/ Calculation/ MathTrig.php, line 881
Class
- PHPExcel_Calculation_MathTrig
- PHPExcel_Calculation_MathTrig
Code
public static function RAND($min = 0, $max = 0) {
$min = PHPExcel_Calculation_Functions::flattenSingleValue($min);
$max = PHPExcel_Calculation_Functions::flattenSingleValue($max);
if ($min == 0 && $max == 0) {
return mt_rand(0, 10000000) / 10000000;
}
else {
return mt_rand($min, $max);
}
}