laravel-streams / streams-core

Streams is an open-source web application engine for Laravel.
https://streams.dev
Other
170 stars 99 forks source link

Fixed stupid float behaviour #727

Closed Eighke closed 3 years ago

Eighke commented 3 years ago

100 is not enough. 19.99 will become 19.98...

RyanThompson commented 3 years ago

Ugh, is this the "proper" way to handle this? I like the approach but got me thinking about the next version. Stupid behavior indeed! Thanks for the patch.

Eighke commented 3 years ago

I saw on PHP docs that float are stupid. I see many are using * pow($number, $decimal) / pow($number, $decimal) ... but well I assumed we are only using 2 decimals max.