mozilla
Your Search Results

    JS_NumberValue

    This article covers features introduced in SpiderMonkey 17

    Convert a C floating-point number of type double to a jsval.

    Syntax

    jsval
    JS_NumberValue(double d);
    
    Name Type Description
    d double The numeric value to convert.

    Description

    JS_NumberValue converts a C floating-point number of type double to jsval, the type of JavaScript values.

    The result is an integer jsval if d can be stored that way. Otherwise, a new floating-point jsval is created.

    See Also

    Document Tags and Contributors

    Contributors to this page: fscholz, kscarfone, arai, MMondor, tschneidereit, Dria, scavenger, Jorend
    Last updated by: arai,
    Hide Sidebar