[Logo]
Forums Register Login
Can I twiddle those float bits?
Howdy All!
I need to combine two 16-bit values into a single 32-bit float. That is, I have a float (32 bits)that has been broken into two shorts (16 bits each) and I need to recombine the shorts to recreate the value. It's easy to make an int out of them, but you can't use bit operators on a floating point number.
Thanks!
Pa
Note to self: Check out the Float.intBitsToFloat() method!
Sorry about the post, but thanks for lookin!
Pa
Gotta love a guy that answers his own post .
...though we should probably point out that our display name policy does forbid "obviously fictitious" names. Please edit your profile to change it to a real name (or at least, one that looks real). Although you do get points for a nice clever one that even fits in pretty well with our ranch motif. Thanks.
I miss the old days when I would think up a sinister scheme for world domination and you would show a little emotional support. So just look at this tiny ad:
Rocket Oven Kickstarter - from the trailboss
https://coderanch.com/t/695773/Rocket-Oven-Kickstarter-trailboss


This thread has been viewed 647 times.

All times above are in ranch (not your local) time.
The current ranch time is
Jul 22, 2018 22:17:18.