0.3, 0.1 + 0.2, false
],
[0.4 - 0.1, 0.1 + 0.2, false
],
[0.1 + 0.1 + 0.1, 0.1 + 0.2, false
],
];
} /**
* @dataProvider lessThanOrEqualsDataProvider
*/
public function testLessThanOrEquals(float
$a, float
$b, bool
$expected): void
{ static::
assertSame($expected, FloatComparator::
lessThanOrEquals($a,
$b));
} /**
* @return array{0: float, 1: float, 2: bool}[]
*/
public static function lessThanOrEqualsDataProvider(): array
{ return [ [0, 0, true
],
[42, 42, true
],
[1.0, 1.0, true
],
[