round() публичный Метод

The precision defines the number of digits after the decimal point. Negative values are also supported (-1 rounds to full 10ths).
public round ( float $subject, integer $precision ) : float
$subject float The value to round
$precision integer The precision (digits after decimal point) to use, defaults to 0
Результат float The rounded value
 /**
  * @test
  * @dataProvider roundExamples
  */
 public function roundWorks($value, $precision, $expected)
 {
     $helper = new MathHelper();
     $result = $helper->round($value, $precision);
     if ($expected === static::NAN) {
         $this->assertTrue(is_nan($result), 'Expected NAN');
     } else {
         $this->assertEquals($expected, $result, 'Rounded value did not match', 0.0001);
     }
 }