summaryrefslogtreecommitdiff
path: root/functions/round.pp
blob: 6bad92dcc4c33fff01e3d66e1917d70ef0e13a10 (plain)
1
2
3
4
5
6
7
8
9
function stdlib::round(
  Numeric $input,
) {
  if $input >= 0 {
    Integer( $input + 0.5 )
  } else {
    Integer( $input - 0.5 )
  }
}