src/pylib/builtins/round/no_ndigit

Search:
Group by:
Source   Edit  

Procs

func round[F: SomeFloat](x: F): F
if two multiples are equally close, rounding is done toward the even choice a.k.a.round-to-even
Hint: Nim's round in std/math just does like C's round

Example:

assert round(6.5) == 6
assert round(7.5) == 8
Source   Edit