roundWithSign

Type:Function
Status:stable
Since:1.0.0
Platform:jsnode
@blackbyte.sugar.shared.math

This function allows you to round a number by keeping his sign ”+” or ”-“

Params

  1. number*-Number

    The number to round

Return

  1. -Number

    The rounded number

Example

import { roundWithSign } from '@blackbyte/sugar/math';
roundWithSign(1.5); // => 1
roundWithSign(-1.5); // => -1

Todo

  • testsnormal