JS DoubleToInt32

This article covers features introduced in SpiderMonkey 1.8.6

Convert a C floating-point number of type jsdouble to 32-bit integer.

Syntax

int32  JS_DoubleToInt32(jsdouble d);
uint32  JS_DoubleToUint32(jsdouble d);
Name Type Description
d jsdouble The numeric value to convert.

Description

JS_DoubleToInt32 converts a C floating-point number of type jsdouble to int32, a signed 32-bit integer.

JS_DoubleToUint32 converts a C floating-point number of type jsdouble to uint32, an unsigned 32-bit integer.

MXR ID Search for JS_DoubleToInt32

MXR ID Search for JS_DoubleToUint32

Document Tags and Contributors

Contributors to this page: Sheppy
Last updated by: Sheppy,