frac() (Game Maker)


(Game Maker 1.1, 6.1, 7)

frac - return the decimal fraction of a number


num = frac( num )

  • rnum - returned fraction
  • num - number with fraction

frac() returns the decimal fraction of a number, in other words, the part past the decimal point.


Example of Use

fraction = frac(99.87);

In this example, the value of fraction will be 0.87.

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