izupet / angular2-counto

Angular 2 package for nice count animations
MIT License
40 stars 13 forks source link

Rounding errors during interval count #4

Closed japalo closed 7 years ago

japalo commented 7 years ago

Hi, I've found that in some cases the emitted value has got a lot of decimals. I suggest that in the directive where the emit is done the value should be rounded closest integer while counting. In the end of the count the directive can pass _this._countTo as intended with or without decimals.

What do you think?

izupet commented 7 years ago

I will take a look on that. You can create PR if you want to speed up things.

izupet commented 7 years ago

You should handle rounding with pipes or custom methods.