function TestClip(var A: Integer; var B: Integer; const Size: Integer): Boolean; overload;
function TestClip(var A: Integer; var B: Integer; const Start: Integer; const Stop: Integer): Boolean; overload;
First version: Exchange A <-> B only if B < A, then restrict both to [0..Size-1] range. Returns true if resulting range has common points with [0..Size-1] range.
Second version: Exchange A <-> B only if B < A, then restrict both to [Start..Stop-1] range. Returns true if resulting range has common points with [Start..Stop-1] range.
Copyright ©2000-2024 Alex Denisov and the Graphics32 Team - Graphics32 2.0 - Help file built on 18 Feb 2024