mirror of
https://github.com/nim-lang/Nim.git
synced 2026-01-08 14:03:23 +00:00
Fixed a typo in proc -(x: T, y: Rational[T])
This commit is contained in:
@@ -164,7 +164,7 @@ proc `-` *[T](x: Rational[T], y: T): Rational[T] =
|
||||
|
||||
proc `-` *[T](x: T, y: Rational[T]): Rational[T] =
|
||||
## Subtract rational `y` from int `x`.
|
||||
result.num = - x * y.den + y.num
|
||||
result.num = x * y.den - y.num
|
||||
result.den = y.den
|
||||
|
||||
proc `-=` *[T](x: var Rational[T], y: Rational[T]) =
|
||||
|
||||
Reference in New Issue
Block a user