PHP code example of boonyaritth7 / satung-rounding
1. Go to this page and download the library: Download boonyaritth7/satung-rounding library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
boonyaritth7 / satung-rounding example snippets
use Satung\SatungRounding;
// Calculate
echo SatungRounding::calculate("99.99"); // You wil get 100
echo SatungRounding::calculate("99.68"); // You wil get 99.75
echo SatungRounding::calculate("99.42"); // You wil get 99.5
echo SatungRounding::calculate("99.32"); // You wil get 99.25
echo SatungRounding::calculate("99.11"); // You wil get 99
// Calculate antity
echo SatungRounding::calculate("99.99", 7, 3); // You wil get 321
echo SatungRounding::calculate("99.68", 7, 3); // You wil get 320.25
echo SatungRounding::calculate("99.42", 7, 3); // You wil get 319.5
echo SatungRounding::calculate("99.32", 7, 3); // You wil get 318.75
echo SatungRounding::calculate("99.11", 7, 3); // You wil get 318
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.