You've already forked lazarus-ccr
mbColorLib: Clean up. Refactoring of single-value pickers ("clamp")
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@5457 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
22
components/mbColorLib/mbutils.pas
Normal file
22
components/mbColorLib/mbutils.pas
Normal file
@@ -0,0 +1,22 @@
|
||||
unit mbUtils;
|
||||
|
||||
{$mode objfpc}{$H+}
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Classes, SysUtils;
|
||||
|
||||
procedure Clamp(var AValue:Integer; AMin, AMax: Integer);
|
||||
|
||||
implementation
|
||||
|
||||
procedure Clamp(var AValue: integer; AMin, AMax: integer);
|
||||
begin
|
||||
if AValue < AMin then AValue := AMin;
|
||||
if AValue > AMax then AValue := AMax;
|
||||
end;
|
||||
|
||||
|
||||
end.
|
||||
|
Reference in New Issue
Block a user