Leroy Whetstone <lrw### [at] joplin com> wrote:
> Warp wrote:
> > The standard arrays.inc already provides a Sort_Array() macro.
> >
> > http://wiki.povray.org/content/Documentation:Reference_Section_7#arrays.inc
> >
> True, but it does one array! It doesn't move associated arrays with it.
> My idea is you have a group of arrays linked so if you sort using one of
> them all the others are also move around. The Sort_Array() macro could
> be modified to do so. You would have to rewrite it for every time the
> number of arrays you have changed.
You don't need to rewrite it. You simply implement your own comparison
and swapping macros (Sort_Compare() and Sort_Swap_Data()) to perform those
operations.
--
- Warp
Post a reply to this message
|