Summary
Fractional part of values.
Class
TMtxVec
Declaration
Function Frac(X: TMtxVec; XIndex, Index, Len: integer): TMtxVec;
Description
Calculates the fractional part for X object elements [XIndex]..[XIndex+Len-1] and stores the result in calling object elements [Index]..[Index+Len-1]. An exception is raised if array borders are overrun or underrun.
Declaration
Function Frac: TMtxVec;
Description
Calculates the fractional part for all object values in-place.
Example 1
var a: TVec;
ind: Integer;
begin
a := TVec.Create;
try
a.SetIt(False,[1,5.5,-1.6,6]); // a = [1, 5.5, -1.6, 6]
a.Frac; // a = [0, 0.5, -0.6, 0]
finally
a.Free;
end;
end;
Declaration
Function Frac(Index, Len: integer): TMtxVec;
Description
Calculates the fractional part for calling object elements [Index]..[Index+Len-1] in-place An exception is raised if array borders are overrun or underrun.
Declaration
Function Frac(X: TMtxVec): TMtxVec;
Description
Calculates the fractional part for all X object values and stores the result in calling object. Size and Complex properties of calling object are adjusted automatically.
| Copyright 2008 Dew Research |
http://www.dewresearch.com