It is currently Mon Nov 20, 2017 11:40 pm

All times are UTC - 5 hours




 Page 1 of 1 [ 2 posts ] 
Author Message
 Post subject: Network VMK 19 - Float Conversion Tests
PostPosted: Tue Feb 14, 2012 6:33 am 
Site Admin

Joined: Sun Feb 11, 2007 8:59 am
Posts: 1105
Location: Ontario Canada
In the previous VMK I left out how to transmit floating point numbers across the network. In this VMK I demonstrate different ways in which this can be done.


Offline
 Profile  
 
 Post subject: Re: Network VMK 19 - Float Conversion Tests
PostPosted: Sat Feb 18, 2012 7:49 am 

Joined: Sat Aug 16, 2008 7:58 am
Posts: 449
Very nice VMK. Sometimes the simplest implementation works the best. I find it funny that people have written functions to convert from float to an int and another for the opposite conversion. However, your algorithm of using a scale factor being a multiple of base 10, works great by multiplying it then dividing by it. Very simple and very effective with very little data loss.


Offline
 Profile  
 
Display posts from previous:  Sort by  
 Page 1 of 1 [ 2 posts ] 

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Jump to:  

cron