Graphics

 View Only
  • 1.  Visual Logic Math functions

    Posted 12-03-2014 20:50
    A question:

    Round - WTF is it rounding to? The value I see coming out is the same value that went in. There doesn't seem to be any way to control the precision one is rounding to.

    Also: INT and CINT functions would be very useful. Sometimes, you need an integer.

    And, while I'm on that topic, why is it that, when I put an integer value into the Value function, I get a float that is close to, but not exactly, the value I put in?


  • 2.  RE: Visual Logic Math functions

    Posted 12-04-2014 02:23
    Round() rounds to the nearest integer.

    You shouldn't need a CInt as you can feed any text to a block requiring an integer and it automatically converts from string to integer.

    There is a FormatFloat() block in the String section that lets you control the display/precision if you want to display a floating point value with a certain number of decimal points.





    #XPression


  • 3.  RE: Visual Logic Math functions

    Posted 12-04-2014 20:07
    Hmmm... when I t did it, I ended up with a value that included decimal places. That's not what I needed there...

    #XPression


  • 4.  RE: Visual Logic Math functions

    Posted 08-10-2015 14:29
    Hi, is formatfloat still available? I can't find it in v5.7......

    #XPression


  • 5.  RE: Visual Logic Math functions

    Posted 08-10-2015 20:02
    Jim, there have been some slight changes to those block behavior in version 6. You may need to upgrade.

    Tobias, the formatfloat block was added in version 6.0, you will need to update for it.

    #XPression