Home | GR32_Lowlevel |
TestClip
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;
Description
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.
See Also
Copyright ©2000-2007 Alex Denisov and Contributors - Graphics32 v1.8.3 - Build on 4-March-2007