If you have a problem or need to report a bug please email : support@dsprobotics.com
There are 3 sections to this support area:
DOWNLOADS: access to product manuals, support files and drivers
HELP & INFORMATION: tutorials and example files for learning or finding pre-made modules for your projects
USER FORUMS: meet with other users and exchange ideas, you can also get help and assistance here
NEW REGISTRATIONS - please contact us if you wish to register on the forum
Users are reminded of the forum rules they sign up to which prohibits any activity that violates any laws including posting material covered by copyright
Approximate numbers Help
14 posts
• Page 2 of 2 • 1, 2
Re: Approximate numbers Help
hmm, maybe some multiplication and division trick using int?
But Ruby is prolly the way
But Ruby is prolly the way
-
nix - Posts: 817
- Joined: Tue Jul 13, 2010 10:51 am
Re: Approximate numbers Help
nix wrote:But Ruby is prolly the way
Yes Maybe in the future there will be a dedicated prim Thanks for the hints anyway!
- Nowhk
- Posts: 275
- Joined: Mon Oct 27, 2014 6:45 pm
Re: Approximate numbers Help
Nowhk wrote:Anyway, that's won't "round" really to the last digit, just "cut" the string.
thats not true, the format string does correct rounding...
this has been discussed several times here on the forum, here is one with different solutions:
viewtopic.php?f=3&t=3666&start=30
- Attachments
-
- Float to Decimal Place Converter.fsm
- (399 Bytes) Downloaded 801 times
-
Nubeat7 - Posts: 1347
- Joined: Sat Apr 14, 2012 9:59 am
- Location: Vienna
Re: Approximate numbers Help
Nubeat7 wrote:Nowhk wrote:Anyway, that's won't "round" really to the last digit, just "cut" the string.
thats not true, the format string does correct rounding...
this has been discussed several times here on the forum, here is one with different solutions:
viewtopic.php?f=3&t=3666&start=30
Oh nice, your example seems to works better. In fact here the rounding is not the expected value:
(for you example, 57.783 and not 57.784). Thanks for the tip dude! Another learned thing!
- Nowhk
- Posts: 275
- Joined: Mon Oct 27, 2014 6:45 pm
14 posts
• Page 2 of 2 • 1, 2
Who is online
Users browsing this forum: No registered users and 50 guests