Magento Extensions Rating 2024
EXTENSIONS BY CATEGORY
B2B (Business-To-Business)
Blog
Customer
ERP (Enterprise Resource Planning)
Mega Menu
One Step Checkout
Order
POS (Point Of Sale)
Search
Shopping Cart
Sitemap
SEO
Social
Stock & Inventory Management
EXTENSIONS BY DEVELOPER
aheadWorks
Amasty
Boost My Shop
BSS Commerce
Magestore
MageWorx
Mirasvit
Templates Master
Wyomind
XTENTO
Magento 2 Documentation
Magento 2 Documentation
2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
vendor
magento
framework
Math
FloatComparator.php
Go to the documentation of this file.
1
<?php
6
declare(strict_types=1);
7
8
namespace
Magento\Framework\Math
;
9
16
class
FloatComparator
17
{
23
private
static
$epsilon = 0.00001;
24
33
public
function
equal
(
float
$a,
float
$b): bool
34
{
35
return
abs($a - $b) <= self::$epsilon;
36
}
37
46
public
function
greaterThan
(
float
$a,
float
$b): bool
47
{
48
return
($a - $b) > self::$epsilon;
49
}
50
59
public
function
greaterThanOrEqual
(
float
$a,
float
$b): bool
60
{
61
return
$this->
equal
($a, $b) || $this->
greaterThan
($a, $b);
62
}
63
}
Magento\Framework\Math
Definition:
Calculator.php:6
Magento\Framework\Math\FloatComparator\greaterThan
greaterThan(float $a, float $b)
Definition:
FloatComparator.php:46
Magento\Framework\Math\FloatComparator\greaterThanOrEqual
greaterThanOrEqual(float $a, float $b)
Definition:
FloatComparator.php:59
Magento\Framework\Math\FloatComparator
Definition:
FloatComparator.php:16
Magento\Framework\Math\FloatComparator\equal
equal(float $a, float $b)
Definition:
FloatComparator.php:33