CPolynomial:Copy
The Copy method duplicates the polynomial coefficients and returns the new copy.
P = CPolynomial:Copy() |
The following script fragment duplicates the coefficient set P into a new set P2:
|
-- create a CPolynomial |
|
-- set coef[0] |
|
-- set coef[1] |
|
-- set coef[4] |
|
-- creates a duplicate coefficient set named P2 |
|
-- result: N = 3 |
|
-- if finished with P, clean up memory |