Re: [heycam/webidl] Refactor integer conversion in ES bindings. (#235)

tobie commented on this pull request.



> +
+<div algorithm>
+
+    <dfn lt="IntegerPart" abstract-op>IntegerPart(|n|)</dfn>:
+
+    1.  Let |r| be [=floor=]([=abs=](|n|))
+    1.  If |n| &lt; 0, then return -1 × |r|.
+    1.  Otherwise return |r|.
+</div>
+
+<div algorithm>
+    <dfn lt="ConvertToInt" abstract-op>ConvertToInt(|V|, |bitLength|, |signedness|)</dfn>:
+    1.  If |bitLength| is 64, then:
+        1.  Let |upperBound| be 2<sup>53</sup> − 1.
+        1.  If |signedness| is "unsigned", then let |lowerBound| be 0.
+        1.  Otherwise let |lowerBound| be −2<sup>53</sup>.

It is. :(

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/heycam/webidl/pull/235

Received on Friday, 11 November 2016 20:32:12 UTC