Rounding to nearest fraction (half, quarter, etc.)

后端 未结 4 1404
北荒
北荒 2020-11-28 06:43

So, I need to create the following functions but my head can\'t think of any possibility in PHP without complicated math.

  • Round always up to t
4条回答
  •  [愿得一人]
    2020-11-28 06:59

    Look at example #3 on here and it is half of your solution - http://php.net/manual/en/function.round.php

提交回复
热议问题