integer calculating possible?

Hi,

I try to get an integer value of an (probable) decimal value. Is it possible in IPP3?

Thx for help

Comments

  • edited May 2018

    The commands ceil(n) and floor(n) and round (n) work to round up, round down, and round (proper) to the nearest integer. You can find these and more in help file under Gen Files Crash Course\Expressions\Built In Functions

    If you want to round a variable value to a specific number of decimal places try this: I use this code to round up to the nearest 1/10th:

    {@BaseSize==((6d4)/6)+15)} //results is a floating point decimal number between 16 and 19
    
    Table: Size
    Size is {@Size={ceil({@BaseSize}*10)/10}} 
    
    //this takes an integer like 16.728659, then x10 to make it 167.28659, then ceiling expression to make it 168, then /10 to make it 16.8.
    //Use round(n) or floor(n) to make the result 16.7 instead
    

    Good luck!

  • Thx for your help - I didn't saw this functions at the Built in Functions.

Leave a Comment