Update toInt doc
This commit is contained in:
parent
444beab5dd
commit
2d004dd677
1 changed files with 2 additions and 2 deletions
|
|
@ -26,8 +26,8 @@ proc toFloat*(x: Rational): float =
|
|||
x.num / x.den
|
||||
|
||||
proc toInt*(x: Rational): int =
|
||||
## Convert a rational number `x` to an int. Conversion rounds down if `x`
|
||||
## does not contain an integer value.
|
||||
## Convert a rational number `x` to an int. Conversion rounds towards 0 if
|
||||
## `x` does not contain an integer value.
|
||||
x.num div x.den
|
||||
|
||||
proc reduce*(x: var Rational) =
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue