Closed crystalthoughts closed 4 months ago
Probably this is good to be added, will see. Thank you. for now, you can send raw binary.
function floatToUint8Array(floatValue) {
const floatArray = new Float32Array([floatValue]);
return new Uint8Array(floatArray.buffer);
}
const myFloat = 3.14159;
myBackendFun(floatToUint8Array(myFloat))
Added.
myBackendFun(123.456)
double f = webui_get_float(e);
@hassandraga Wouldn't webui_return_float
be nice aswell?
I forgot. Sorry, my bad! Added.
Thanks! So glad i found this
On Thu, 30 May 2024 at 01:04, Hassan DRAGA @.***> wrote:
I forgot. Sorry, my bad! Added https://github.com/webui-dev/webui/commit/4517ba498290276a5ccc1636873af3e971a656f5 .
— Reply to this email directly, view it on GitHub https://github.com/webui-dev/webui/issues/367#issuecomment-2138392455, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABSNQQG2R53QBW4GNX7NP7TZEZNHPAVCNFSM6AAAAABIJ6LFVGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMZYGM4TENBVGU . You are receiving this because you authored the thread.Message ID: @.***>
Hi, is it possible to send floats between backend and frontend? I notice only int, string and bool is available on bind?