The SDL Component Suite is an industry leading collection of components supporting scientific and engineering computing. Please visit the SDL Web site for more information....



SortSwap


Unit: SDL_math1
Class: None
Declaration: function SortSwap (var v1, v2: double; Ascending: boolean): boolean;

The function SortSwap exchanges the values v1 and v2 if the sort criterion given by the parameter Ascending is not met. Ascending specifies the required order of v1 and v2, if Ascending is TRUE v2 must be greater than v1 (ascending order), if Ascending is FALSE a descending order is expected (v2 is less than v1). The function returns a TRUE value if a swap has occurred.



Last Update: 2023-Feb-06