JSBool JS_ValueToDouble()

Usage

JSBool JS_ValueToDouble(JSContext *cx, jsval v, double *dp); 

Description

Method; extracts a function argument from a jsval structure, converts it to a double (if possible), and passes the converted value back to the caller.

Arguments

JSContext *cx, jsval v, double *dp

Returns

A Boolean value: JS_TRUE indicates success; JS_FALSE indicates failure.