floor() (Game Maker)


(Game Maker 1.1, 6.1, 7)

floor - return the floor of a number


rnum = floor( num )

  • rnum - returned floored number
  • num - number to be floored

When used, this will always round a number with a decimal down. It is the equivalent of simply removing the decimal fraction.


Example of Use

rnum = floor(9.99);

After this code in this above example is executed, the value of rnum will be 9, not 10.

Related Pages

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution 2.5 License.