Old 07-24-2021, 03:06 PM   #1
paaltio
Human being with feelings
 
Join Date: Aug 2011
Posts: 151
Default 64-bit float from SNM_GetLongConfigVar?

I’m trying to read/write ”projtimeoffs” using SNM_GetLongConfigVar and for the life of me can’t figure out how to convert the high and low values into a usable value. Anyone have any insight on how to extract float values in Lua from the high and low 32-bit integers returned by that function?

Last edited by paaltio; 07-24-2021 at 03:23 PM.
paaltio is offline   Reply With Quote
Old 07-24-2021, 03:41 PM   #2
cfillion
Human being with feelings
 
cfillion's Avatar
 
Join Date: May 2015
Location: Québec, Canada
Posts: 3,743
Default

Double-precision floating-point numbers should be read using SNM_GetDoubleConfigVar.
cfillion is offline   Reply With Quote
Old 07-25-2021, 12:22 AM   #3
paaltio
Human being with feelings
 
Join Date: Aug 2011
Posts: 151
Default

Thanks so much, I can’t believe I didn’t see that!
paaltio is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 06:43 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2021, vBulletin Solutions Inc.