Math, always rounding down and limiting decimal

math.round doesn’t quite do what I want, I need it to ALWAYS round down even if it.s .9 or .7 or whatever the number is, is this possible?

and second question, is there a way to limit how many decimals to show and calculate. for example
30.436875347534 to become 30.44

thanks in advance for any help [import]uid: 77199 topic_id: 29874 reply_id: 329874[/import]

  1. math.floor
  2. yes - to show, look at string.format. To change the number, for your example, something like math.round(number*100)/100 will work. [import]uid: 160496 topic_id: 29874 reply_id: 119773[/import]

love you, thanks for the fast answer as well
both perfect answers, tyvm [import]uid: 77199 topic_id: 29874 reply_id: 119775[/import]

  1. math.floor
  2. yes - to show, look at string.format. To change the number, for your example, something like math.round(number*100)/100 will work. [import]uid: 160496 topic_id: 29874 reply_id: 119773[/import]

love you, thanks for the fast answer as well
both perfect answers, tyvm [import]uid: 77199 topic_id: 29874 reply_id: 119775[/import]