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
jimmykane
changed the title
Should Data values be stored to their precision?
[Discussion] Should Data values be stored to their precision?
Mar 10, 2020
As a user of the lib.
I would prefer to receive the full value (no rounding).
So that I can round the results on my end.
However, it would be nice to have a helper function that would allow me to specify the precision.
PS: great project, thanks for making it public, and publishing to npmjs cheers!
@guikeller Agreed. I ll look into this. Currently you can:
distance = new DataDistance(1.222222222)
distance.getValue() // Gives back the full precision
distance.getDisplayValue() // Gives back a predifined precision
One could for now at least do something like distance.getValue().toFixed(2) for example
Due to several calculations eg adding up distance the result can have many decimal places
eg
1.2348292993
During the Strava compliance tests eg strava reports distance with 1 decimal
1.2
getValue(precise)
?The text was updated successfully, but these errors were encountered: