Author Topic: Converting 32bit float to integer, and vise versa  (Read 10572 times)

Offline jashom1

  • PLUS+1 Expert
  • ****
  • Posts: 80
  • Karma: +6/-0
Converting 32bit float to integer, and vise versa
« on: October 25, 2011, 03:15:56 AM »
Hi,

I am trying to convert 32 bit float into a 32 bit signed integer, and back again.  I have managed to get the connversion working for float -> integer, now just working on the routine to convert it back.

I have rounded the number to 3 decimal places (multiplied the float by 1000)

Has anyone done this before?  Surely there is an easier conversion block out there!

Thanks,

John.