ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
DistributionValidations.php
Go to the documentation of this file.
1<?php
2
4
8
10{
14 public static function validateProbability($probability): float
15 {
16 $probability = self::validateFloat($probability);
17
18 if ($probability < 0.0 || $probability > 1.0) {
19 throw new Exception(Functions::NAN());
20 }
21
22 return $probability;
23 }
24}
An exception for terminatinating execution or to throw for unit testing.