yalesov / math
A collection of math functions.
Installs: 20
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/yalesov/math
Requires
- php: >=5.3.3
- yalesov/arg-validator: 2.*
Requires (Dev)
This package is not auto-updated.
Last update: 2025-10-26 01:46:22 UTC
README
A collection of math functions.
Installation
{
"require": {
"yalesov/math": "2.*"
}
}
Usage
roundUp
Round a $number up to a certain $precision:
use Yalesov\Math\Math; Math::roundUp($number, $precision);
$number: any numeric scalar
$precision: follows PHP's round function, i.e.
2= two decimal places-2= neartest hundreds
getDecimalPlace
Get the number of decimal places:
use Yalesov\Math\Math; $dp = Math::getDecimalPlace(0.123456789); // $dp = 9