Please note, this is a STATIC archive of website developer.mozilla.org from November 2016, cach3.com does not collect or store any user information, there is no "phishing" involved.

JSVAL_TO_DOUBLE

Obsolete since JSAPI 32
This feature is obsolete. Although it may still work in some browsers, its use is discouraged since it could be removed at any time. Try to avoid using it.

Casts a given jsval to a jsdouble without any type checking or error handling.

Syntax

jsdouble
JSVAL_TO_DOUBLE(jsval v);

Description

JSVAL_TO_DOUBLE casts a specified JS value, v, to a C floating-point number of type jsdouble. As a precondition, JSVAL_IS_DOUBLE(v) must be true. This function is not type-safe: if v is an integer, string, null, or anything else, the behavior is undefined.

To convert any value to a number, use JS_ValueToNumber instead.

See Also

Document Tags and Contributors

 Contributors to this page: arai, fscholz, lw, Jorend, Rappo
 Last updated by: arai,