PruneParticles

Declaration: TParticles.PruneParticles (PruneMode: TPruneMode; ThreshLow, ThreshHigh: double): integer;
The function PruneParticles removes all particles whose parameter specified by PruneMode is not within the interval [ThreshLow,ThreshHigh] from the particle collection.

The function returns the following error codes:

 0 ... everything is OK, the function returns the number of remaining particles
-1 ... ThreshLow must not be greater than ThreshHigh

Hint: In order to access the particles currently loaded in the particle editor you can use the pre-declared global variable PEData.