php-bignumbers
php-bignumbers copied to clipboard
[WIP] Add important numerical constants
A list of important numerical constants.
Interfaces
- [X] Zero
- [X] One
- [X] PI
- [X] E
- [X] Euler - Mascheroni Constant
- [X] Golden Ratio
- [ ] Silver Ratio
- [X] Light Speed
Arbitrary precision (via $scale
parameter)
- [ ] PI
- [X] E
- [ ] Euler - Mascheroni Constant
- [ ] Golden Ratio
- [ ] Silver Ratio
Integration with Decimal
- [X] Use the
Zero
constant instead of creating new zero objects inside Decimal methods. - [X] Use the
One
constant instead of creating new one objects inside Decimal methods.
The non-phisical numerical constants must be associated to a method with the following signature:
public static function ConstantName($scale);
This methods will allow to specify how many digits we want for every one of the supported numerical constants.
Hi @castarco, I create PR to add silver ratio.