You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I downloaded the geostats library several days ago, it was the master branch. I found some little issues in the new implementation of the 3 functions min, max and decimalFormat.
In the min and max functions, there are undeclared variables respectively called min (line 277) and max (line 293), that I believe is a bug when you changed the implementation for those 2 functions. I think they should be this.stat_min and this.stat_max instead.
In the decimalFormat function, when you use toFixed() (line 245), values in the number array (a) will be converted to string and copied to the new array (b). Therefore, there will be a subtle type transformation of the serie, and will become a greater issue when we search for the min and max values of the serie (since 2 < 12 but "2" > "12"). I suggest to add parseFloat after doing toFixed() (b[i] = parseFloat(parseFloat(a[i]).toFixed(this.precision));).
Nonetheless, your library geostats is a great help for our works concerning statistics.
Best regards,
Dac Anh Minh LE
The text was updated successfully, but these errors were encountered:
Thanks for reporting.
I introduced proposed fixes.
I quickly restored old code to fix a bug issue related to min/max whithout changing varibales names. Well spotted.
I also implemented a type transformation on decimalFormat().
Last commit is available at 8941b54
I also release geostats in v1.6.
Thanks again.
Hello,
I downloaded the geostats library several days ago, it was the master branch. I found some little issues in the new implementation of the 3 functions min, max and decimalFormat.
In the min and max functions, there are undeclared variables respectively called min (line 277) and max (line 293), that I believe is a bug when you changed the implementation for those 2 functions. I think they should be this.stat_min and this.stat_max instead.
In the decimalFormat function, when you use toFixed() (line 245), values in the number array (a) will be converted to string and copied to the new array (b). Therefore, there will be a subtle type transformation of the serie, and will become a greater issue when we search for the min and max values of the serie (since 2 < 12 but "2" > "12"). I suggest to add parseFloat after doing toFixed() (b[i] = parseFloat(parseFloat(a[i]).toFixed(this.precision));).
Nonetheless, your library geostats is a great help for our works concerning statistics.
Best regards,
Dac Anh Minh LE
The text was updated successfully, but these errors were encountered: