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)
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.
Rounding String or Float Variables
-
- Matrix Staff
- Posts: 9521
- Joined: Sat May 05, 2007 2:27 pm
- Location: Northamptonshire, UK
- Has thanked: 2585 times
- Been thanked: 3815 times
Rounding String or Float Variables
- Attachments
-
- Rounding Float Or String Numbers.fcf
- (12.67 KiB) Downloaded 676 times
Martin
-
- Matrix Staff
- Posts: 9521
- Joined: Sat May 05, 2007 2:27 pm
- Location: Northamptonshire, UK
- Has thanked: 2585 times
- Been thanked: 3815 times
Re: Rounding String or Float Variables
Hi Steven,
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
Steven_SS wrote:How can I open this in flowcode V8 Martin? Thanksmedelec35 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
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
- Attachments
-
- Rounding Float Or String Numbers.fcfx
- (13.63 KiB) Downloaded 473 times
Last edited by medelec35 on Mon Dec 03, 2018 9:37 pm, edited 1 time in total.
Martin
-
- Flowcode v5 User
- Posts: 273
- Joined: Thu Apr 17, 2008 9:59 am
- Has thanked: 19 times
- Been thanked: 16 times
Re: Rounding String or Float Variables
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
If it can't be fixed, maybe indicate in the help file that it doesn't work for PIC processors.
Jan Didden
Linear Audio