GameSalad

Convert decimal to whole number formula?

What is the formula to convert decimal to whole number?... amazingly, could not find this anywhere in gamesalad forum...

Comments

  • Simple+Gamer+ArtsSimple Gamer Arts Posts: 136Member, PRO

    Ok... found it in one of my old discussions.

    You have to use expression "round"

  • JapsterJapster Posts: 473Member, PRO

    @Simple Gamer Arts said:
    Ok... found it in one of my old discussions.

    You have to use expression "round"

    @Simple Gamer Arts - also, if you DON'T want it to be rounded up (sometimes this can adversely affect what you're trying to achieve, i.e. your max for something might be eg, 14, but you 'round' say, 14.9, and end up with 15), you can also just use 'floor' which will simply return the integer/whole portion of the number (and also 'ceiling' which will ALWAYS round UP, so 0.21 becomes 1, etc.), if that helps... Just an alternative for each scanario... :smile:

  • JapsterJapster Posts: 473Member, PRO

    Ahh... ...and I just noticed that this is the 'GS Online' area - so I'm hoping the functions I mentioned are actually implemented for you at this point... :wink:

  • Simple+Gamer+ArtsSimple Gamer Arts Posts: 136Member, PRO

    @Japster Hey thanks for that info. I'm sure it will come in useful at some point.

Sign In or Register to comment.