Add -f for Fraction

This commit is contained in:
lafrite 2014-01-17 18:10:38 +01:00
parent 8a41031fa8
commit 999fde1c51
1 changed files with 3 additions and 0 deletions

View File

@ -126,6 +126,9 @@ class Fraction(object):
steps += ans_frac.simplify()
return steps
def __neg__(self):
return [Fraction(-self._num,self._denom)]
def __mul__(self, other):
if type(other) == Fraction: