Closed larebsyed closed 5 years ago
Thank you for your PR! Just out of curiosity, what's the difference between round
and fround
? Do you know why it was crashing?
Hey @abrochard, Thanks for looking into my PR, Following is the definition of fround I going frm elisp doc
Function: fround float
This function rounds float to the nearest integral value, and returns that value as a floating-point number. Rounding a value equidistant between two integers returns the even integer.`
As far as I think, the issue may be due to the fact tha Habitica api is returning integer and fround is expecting float.
I have used round instead which according to docs should work on any kind of number. Here is the definition I copied from docs
Function: round number &optional divisor
This returns number, converted to an integer by rounding towards the nearest integer. Rounding a value equidistant between two integers returns the even integer.
Sound good. Thank you for explaining! I merged the PR.
14