void _ms_write_double(const v8::FunctionCallbackInfo<v8::Value>& args) { CMemoryStream* pNative = unwrap_memorystream(args.This()); double arg = (double)args[0]->NumberValue(); pNative->WriteLONG((LONG)(arg * 100000)); args.GetReturnValue().Set(v8::Undefined(v8::Isolate::GetCurrent())); }
void _ms_write_long(const v8::FunctionCallbackInfo<v8::Value>& args) { CMemoryStream* pNative = unwrap_memorystream(args.This()); LONG arg = (LONG)args[0]->Int32Value(); pNative->WriteLONG(arg); args.GetReturnValue().Set(v8::Undefined(v8::Isolate::GetCurrent())); }