{"issue":{"created_at":"2011-11-24T15:58:34Z","state":"open","updated_at":"2011-11-24T15:58:34Z","user":{"gravatar_id":"2e1599d22dce3e1661b6e63e8514b38e","id":155633,"url":"https://api.github.com/users/millermedeiros","login":"millermedeiros","avatar_url":"https://secure.gravatar.com/avatar/2e1599d22dce3e1661b6e63e8514b38e?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png"},"comments":0,"body":"right now if `val < 0` it will return `0`, I'm not sure if that is the right behavior.\r\n\r\nIn AS3 calling `uint(-1.5)` will return `4294967295`.\r\n\r\nAccording to the [ES5 spec](http://es5.github.com/#x9.6) `ToUint32(-1.5)` will return `1`\r\n\r\n3 possible behaviors:\r\n\r\n  1. if `val < 0` return 0 (current);\r\n  2. do `Math.abs(val) >>> 0` (same behavior as ES5 ToUint32);\r\n  3. do `val >>> 0` (same as AS3);\r\n\r\n[see this comment for more details](https://github.com/kriskowal/es5-shim/issues/78#issuecomment-2866000).","assignee":null,"id":2342874,"pull_request":{"patch_url":null,"html_url":null,"diff_url":null},"number":17,"labels":[{"name":"question","color":"DDDDDD","url":"https://api.github.com/repos/millermedeiros/amd-utils/labels/question"}],"title":"ToUInt and ToUInt32 behavior","closed_at":null,"html_url":"https://github.com/millermedeiros/amd-utils/issues/17","milestone":null,"url":"https://api.github.com/repos/millermedeiros/amd-utils/issues/17"},"action":"opened"}