Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Why is the trimming of trailing zeroes enforced by the functions? #36

Closed
ekr3peeK opened this issue Aug 29, 2020 · 5 comments
Closed

Why is the trimming of trailing zeroes enforced by the functions? #36

ekr3peeK opened this issue Aug 29, 2020 · 5 comments
Assignees

Comments

@ekr3peeK
Copy link

I can't understand why would you enforce the trimming of the trailing zeroes after the decimal point?

A global setting, or something simmilar, that can disable this would be nice. Additionally, the class is not extendable at all, as you are calling the static methods with the self:: instead of the static:: caller.

@krowinski krowinski self-assigned this Aug 31, 2020
@krowinski
Copy link
Owner

I assume they are useless (as they usually are) and in my case scenario I din't need them. Sure can add as feature to disable this.

I prefer to use composition then class extending but sure this can be changed.

@ekr3peeK
Copy link
Author

ekr3peeK commented Sep 1, 2020

Thank you!:)

In my scenario, we are calculating with the same precision as we are displaying values in, and I prefer that all the numbers that are displayed be equally long, that's why it is useless for me:) Btw, this is a very nice little plugin, and it would have been a shame not using it.

krowinski added a commit that referenced this issue Sep 9, 2020
- added ability to trim trailing zeros (#36)
- little code cleanup
@krowinski
Copy link
Owner

Changes in master is see one problem that not all bc function supports keeping zeros depends of version of php 😢 In future I will try to add addTRailingZeroFunction 😞

@krowinski
Copy link
Owner

krowinski commented Sep 10, 2020

ok I put few 🩹 🩹 🩹 on code and Its working I "love" to use if php version > some number to keep this code working..

@krowinski
Copy link
Owner

tak 5.2.0 released

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants