Hi there, I'm trying to copy a Float64Array into W...
# webassembly
k
Hi there, I'm trying to copy a Float64Array into WASM memory. Previously, I was using this to copy a UInt8Array over and load it as a Float64Array, but now I plan to actually export Float64 values to Kotlin. However, the scoped memory allocator has no method to load a Float64, only a Long. Is there a way that I can reinterpret a Long as a Double/Float64?
s
Copy code
Double.fromBits(long)
k
@Svyatoslav Kuzmich [JB] thanks much, I'll try it! ❤️
s
And
double.toRawBits()
the other way around.
🎉 1