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
Division.php
Go to the documentation of this file.
1
<?php
6
namespace
Magento\Framework\Math
;
7
14
class
Division
15
{
19
const
DIVIDE_EPSILON
= 10000;
20
28
public
function
getExactDivision
($dividend, $divisor)
29
{
30
$epsilon = $divisor /
self::DIVIDE_EPSILON
;
31
32
$remainder = fmod($dividend, $divisor);
33
if
(abs($remainder - $divisor) < $epsilon || abs($remainder) < $epsilon) {
34
$remainder = 0;
35
}
36
37
return
$remainder;
38
}
39
}
Magento\Framework\Math
Definition:
Calculator.php:6
Magento\Framework\Math\Division
Definition:
Division.php:14
Magento\Framework\Math\Division\DIVIDE_EPSILON
const DIVIDE_EPSILON
Definition:
Division.php:19
Magento\Framework\Math\Division\getExactDivision
getExactDivision($dividend, $divisor)
Definition:
Division.php:28