Convert Binary to Float (and back)

N

Nebiru

I've hacked together some rather ugly code to convert a Binary to a
Float but was hoping there is a more elegant way using perhaps pack and
unpack
 
T

Trans

Nebiru said:
I've hacked together some rather ugly code to convert a Binary to a
Float but was hoping there is a more elegant way using perhaps pack and
unpack

Look at

ri Array#pack

And play around with those options.

T.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,057
Latest member
KetoBeezACVGummies

Latest Threads

Top