Closed rgrempel closed 8 years ago
Of course, you can implement this in plain-old-purescript, but it's likely that the native browser method is faster, when available. And I've included a polyfill for cases where it's not available (mainly IE, according to this page)
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/trunc
I re-pushed the commit with a small whitespace change -- jscs was otherwise complaining about whitespace.
Thanks!
Of course, you can implement this in plain-old-purescript, but it's likely that the native browser method is faster, when available. And I've included a polyfill for cases where it's not available (mainly IE, according to this page)
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/trunc