JS_GetPositiveInfinityValue

  • Revision slug: SpiderMonkey/JSAPI_Reference/JS_GetPositiveInfinityValue
  • Revision title: JS_GetPositiveInfinityValue
  • Revision id: 138945
  • Created:
  • Creator: Waldo
  • Is current revision? No
  • Comment /* Description */ tweak

Revision Content

{{template.Jsapiref()}}

Summary

Function

Retrieves the numeric representation of infinity.

Syntax

jsval JS_GetPositiveInfinityValue(JSContext *cx);
Name Type Description
cx JSContext * Pointer to a JS context from which to derive runtime information.

Description

JS_GetPositiveInfinityValue retrieves the numeric representation of infinity. JS_GetPositiveInfinityValue returns a JS value.

The infinity representation is typically used in JavaScript to represent numbers that are larger than the maximum valid integer or double value.

As a value in mathematical calculations infinite values behave like infinity. For example, any nonzero value multiplied by infinity is infinity with the expected sign, and any finite value divided by infinity is zero (again with the expected sign).

See Also

Groups Functions
Documents {{template.LXRSearch("ident", "i", "JS_GetPositiveInfinityValue", "LXR ID Search")}}
Entries

JS_GetEmptyStringValue, JS_GetNaNValue, JS_GetNegativeInfinityValue

Revision Source

<p> 
{{template.Jsapiref()}}
</p>
<h2 name="Summary"> Summary </h2>
<p><b>Function</b>
</p><p>Retrieves the numeric representation of infinity.
</p>
<h2 name="Syntax"> Syntax </h2>
<pre>jsval JS_GetPositiveInfinityValue(JSContext *cx);
</pre>
<table class="fullwidth-table">
<tbody><tr>
<th>Name</th>
<th>Type</th>
<th>Description</th>
</tr>
<tr>
<td><code>cx</code></td>
<td><code>JSContext *</code></td>
<td>Pointer to a JS context from which to derive runtime information.</td>
</tr>
</tbody></table>
<h2 name="Description"> Description </h2>
<p><code>JS_GetPositiveInfinityValue</code> retrieves the numeric representation of infinity. <code>JS_GetPositiveInfinityValue</code> returns a JS value.
</p><p>The infinity representation is typically used in JavaScript to represent numbers that are larger than the maximum valid integer or double value.
</p><p>As a value in mathematical calculations infinite values behave like infinity. For example, any nonzero value multiplied by infinity is infinity with the expected sign, and any finite value divided by infinity is zero (again with the expected sign).
</p>
<h2 name="See_Also"> See Also </h2>
<table class="fullwidth-table">
<tbody><tr>
<td>Groups</td>
<td><a href="en/JSAPI_Reference#Functions">Functions</a></td>
</tr>
<tr>
<td>Documents</td>
<td>{{template.LXRSearch("ident", "i", "JS_GetPositiveInfinityValue", "LXR ID Search")}}</td>
</tr>
<tr>
<td>Entries</td>
<td>
<p><a href="en/JSAPI_Reference/JS_GetEmptyStringValue">JS_GetEmptyStringValue</a>,
<a href="en/JSAPI_Reference/JS_GetNaNValue">JS_GetNaNValue</a>,
<a href="en/JSAPI_Reference/JS_GetNegativeInfinityValue">JS_GetNegativeInfinityValue</a>
</p>
</td>
</tr>
</tbody></table>
Revert to this revision