update api docs to warn about isNegative pitfall

pull/149/head
Marcell Guilherme Costa da Silva 4 years ago committed by GitHub
parent 5a6e1384d8
commit 39991b8249
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -1659,7 +1659,15 @@ y = new Decimal(2)
y.isNeg // false</pre>
<p>Note: <code>n &lt; 0</code> can be used if <code>n &lt;= -Number.MIN_VALUE</code>.</p>
<p>Also note that signed zeroes are implemented, following the IEEE Standard
for Floating-Point Arithmetic (IEEE 754).</p>
<pre>
Decimal(0).valueOf() // '0'
Decimal(0).isNegative() // false
Decimal(0).negated().valueOf() // '-0'
Decimal(0).negated().isNegative() // true
</pre>
<h5 id="isPos">isPositive<code class='inset'>.isPos() <i>&rArr; boolean</i></code></h5>
<p>

Loading…
Cancel
Save