forked from kalmar/DALGLI0
Update 'poly.py'
This commit is contained in:
parent
965b5a0394
commit
074d255dab
2
poly.py
2
poly.py
@ -7,7 +7,7 @@ class Polynomial:
|
|||||||
|
|
||||||
def __init__(self, coef_list):
|
def __init__(self, coef_list):
|
||||||
self.degree = len(coef_list) - 1
|
self.degree = len(coef_list) - 1
|
||||||
self.coefficients = coef_list
|
self.coefficients = [x % Polynomial.n for x in coef_list]
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def add(p1, p2):
|
def add(p1, p2):
|
||||||
|
Loading…
Reference in New Issue
Block a user