CPolynomial:Exists
The Exists method returns true if a coefficient has been initialized at a given index.
bSuccess = CPolynomial:Exists( index ) |
index is the index of the coefficient to test.
If initialized, this method returns true.
If not initialized, false is returned.
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 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 |
Mira Pro x64 Script User's Guide, Copyright Ⓒ 2024 Mirametrics,
Inc. All Rights Reserved.