Please enable JavaScript to view this site.

KOL/MCK - User Guide

function MulDiv( A, B, C: Integer ): Integer;

Returns A * B div C. Small and fast.

 

function MakeRect( Left, Top, Right, Bottom: Integer ): TRect; stdcall;

Use it instead of VCL Rect function

 

function RectsEqual( const R1, R2: TRect ): Boolean;

Returns True if rectangles R1 and R2 have the same bounds

 

function RectsIntersected( const R1, R2: TRect ): Boolean;

Returns TRUE if rectangles R1 and R2 have at least one common point. Note, that right and bottom bounds of rectangles are not their part, so, if such points are lying on that bounds, FALSE is returned.

 

function PointInRect( const P: TPoint; const R: TRect ): Boolean;

Returns True if point P is located in rectangle R (including left and top bounds but without right and bottom bounds of the rectangle).

 

function OffsetPoint( const T: TPoint; dX, dY: Integer ): TPoint;

 

function OffsetSmallPoint( const T: TSmallPoint; dX, dY: SmallInt ): TSmallPoint;

 

function Point2SmallPoint( const T: TPoint ): TSmallPoint;

 

function SmallPoint2Point( const T: TSmallPoint ): TPoint;

 

function MakePoint( X, Y: Integer ): TPoint;

Use instead of VCL function Point

 

function MakeSmallPoint( X, Y: Integer ): TSmallPoint;

Use to construct TSmallPoint

 

function MakeFlags( FlgSet: PDWORD; FlgArray: array of Integer ): Integer;

 

function MakeDateTimeRange( D1, D2: TDateTime ): TDateTimeRange;

Returns TDateTimeRange from two TDateTime bounds.

 

procedure Swap( var X, Y: Integer );

exchanging values

 

function Min( X, Y: Integer ): Integer;

minimum of two integers

 

function Max( X, Y: Integer ): Integer;

maximum of two integers

 

function Abs( X: Integer ): Integer;

absolute value

 

function Sgn( X: Integer ): Integer;

sign of X: if X < 0, -1 is returned, if > 0, then +1, otherwise 0.

 

function iSqrt( X: Integer ): Integer;

square root

 

function iCbrt( X: DWORD ): Integer;

cubic root

 

KOL / MCK User Guide - Created by Carl Peeraer - Diamant Soft, based on the work of Vladimir Kladov - Artwerp.be

  

Keyboard Navigation

F7 for caret browsing
Hold ALT and press letter

This Info: ALT+q
Nav Header: ALT+n
Page Header: ALT+h
Topic Header: ALT+t
Topic Body: ALT+b
Exit Menu/Up: ESC