Data Storage Tool Display Human Input Protocol Math Motor Control Sensor Signal Generation & Processing Speech & Sound Fun View all Objects


Quick Links
Contact Us
Forums
Support

Register
Login

This object is provided under license. By downloading this object, you are agreeing to the terms of the MIT License.

FloatString

This is an update to the FloatString object. It adds the FloatToFormat routine to return a string of up to 9 characters with the specified number of decimal points. (e.g FloatToFormat(pi,5,2) would return the string " 3.14").

Version:
  1.1

Attributes:


Author:
  Cam Thompson

Categories:
  Math

Downloads:
  1,376

Last Updated:
  2008-03-14



User Reviews:

  • Cam Thompson commented:
    You could extend the string length, but a 32-bit floating point number has only slightly more than seven significant decimal digits. Any digits displayed after the eight significant digit are irrelevant to the precision of the number.
    August 29, 2008 1:05 a.m.


  • Paul commented:
    This object works really well, but I am curious as to why it is limited to 9 characters? I would like to display GPS coordinates in fractional degree format as: 27.123456 with six decimals of precision. Is it possible to extend the precision to 12 or more digits?
    August 28, 2008 3:54 p.m.




  • Copyright 2007 by Parallax, Inc.
    Please contact obex.support@parallax.com with comments or questions.