Re: [w3c/browser-payment-api] Why is details.total.amount.value not a number? (#301)

Strings have all the problems of floats and more thought, no?  You want an integer that represents the currency value divided by 1000 for tenths of a cent, or 10,000 for hundredths of a cent, or whatever folks agree on. JavaScript numbers are all `f64`s under the hood, but one should only use the integer part.  It's plenty big enough and avoid the issues with floats.  You do need to specify how division rounds of course, but that can be done so as to avoid undefined behavior. 

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/w3c/browser-payment-api/issues/301#issuecomment-262941239

Received on Friday, 25 November 2016 11:55:16 UTC