CPolynomial:Exists
The Exists method returns true if a coefficient has been initialized at a given index.
bSuccess = CPolynomial:Exists( index ) |
If you use Init then the first n coefficient values are set and this function will return true if tested with index in range. Otherwise, the coefficient values are not initialized if you do not Set them or if you Remove them.
The following script fragment tests whether the coefficient at index [3] has been initialized:
|
-- create a CPolynomial |
|
-- set coef[4] |
|
-- set coef[1] |
|
-- has coef[3] been set? |
|
|
|
|
|
-- result: coef[3] exists= no |