Type Definition neon::types::JsFloat64Array

source · []
pub type JsFloat64Array = JsTypedArray<f64>;
Expand description

The standard JS Float64Array type.

Example

use neon::types::buffer::TypedArray;

fn double(mut cx: FunctionContext) -> JsResult<JsUndefined> {
    let mut array: Handle<JsFloat64Array> = cx.argument(0)?;

    for elem in array.as_mut_slice(&mut cx).iter_mut() {
        *elem *= 2.0;
    }

    Ok(cx.undefined())
}