DDunc

Registrato in data
DDunc

Aggiornamenti alla documentazione

Mostra tutte le attività
Pagina Data Commento

Math.clz32()


A polyfill for an ES6 method that requires another ES6 method is not a polyfill. Polyfills are not 'for demonstration purposes' or 'approximately the same', they must provide identical backwards compatible functionality.

Math.trunc()


Math.floor is NOT the same as Math.trunc and cannot be used as polyfill! I would think that something like function(n) { return n >= 0 ? Math.floor(n) : Math.ceil(n)} would work as a polyfill, but I'm unsure of edge cases. Removing section for now.

Math.trunc()


function (num) { return num >= 0 ? Math.floor(num) : Math.ceil(num) }