Page 1 of 1

Rounding String or Float Variables

Posted: Tue Nov 27, 2012 11:05 pm
by medelec35
I though I would develop a different way to round off a float variable.
Using pot you can select number of decimal places (0 to 6)
Rounding off.png
(21.54 KiB) Downloaded 4896 times
Decimal numbers are basically cut off, and not rounded up or down.
E.g 1.29 to 1dp = 1.2 and not 1.3

Martin

Edit: Temp2 with original flowchart is not required, so it's fine just to delete it.
I have updated flowchart with Temp2 removed.

Re: Rounding String or Float Variables

Posted: Mon Dec 03, 2018 9:35 pm
by medelec35
Hi Steven,
Steven_SS wrote:
medelec35 wrote: I though I would develop a different way to round off a float variable.
Using pot you can select number of decimal places (0 to 6)
Rounding off.png
Decimal numbers are basically cut off, and not rounded up or down.
E.g 1.29 to 1dp = 1.2 and not 1.3
Martin
How can I open this in flowcode V8 Martin? Thanks

Sorry you can't now, take a look at this post
I'm happy to convert any flowcharts for anyone from any version to version 8.

Edit:
Although you have figured it out and now deleted your post, I will leave this post for anyone else who has V8

Re: Rounding String or Float Variables

Posted: Thu May 09, 2019 3:14 pm
by jadiflow
Can I add my vote that someone fixes this? fround(x,y) doesn't work, instead it work like round(). The floating point number is rounded to the next integer instead of actually rounded up.

If it can't be fixed, maybe indicate in the help file that it doesn't work for PIC processors.

Jan Didden
Linear Audio