src/ExamplesService/Type.php
public function float(float $min, float $max)
    {
        if ($max < $min) {
            throw new ResponseCode('max must be greater than min', 422);
        }

        return rand((int) $min * 100, (int) $max * 100) / 100;
    }
public function float(float $min, float $max)
    {
        if ($max < $min) {
            throw new ResponseCode('max must be greater than min', 422);
        }

        return rand((int) $min * 100, (int) $max * 100) / 100;
    }
public function float ( float $ min , float $ max ) { if ( $ max < $ min ) { throw new ResponseCode ( 'max must be greater than min' , 422 ) ; } return rand ( ( int ) $ min * 100 , ( int ) $ max * 100 ) / 100 ; }
Return a random float.

with 2 decimal taken between $min and $max value

@httpmethod GET
@auth None

@param float $min the min value @validation(gte:0|lte:20)
@param float $max the max value @validation(gte:0|lt:20)

@throws ResponseCode 422 max must be greater than min

@return float the generated value
Return a random float .