Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def *(that : Polynomial) : Polynomial =
- {
- var retPoly = new Polynomial(List())
- for (terms1 <- this.terms;
- terms2 <- that.terms)
- retPoly += terms1*terms2
- retPoly
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement