You are here: Symbol Reference > AbstractMtxVec Namespace > Classes > TMtxVec Class > public > Normalize Method > TMtxVec.Normalize Method (double, double)
MtxVec VCL
ContentsIndex
PreviousUpNext
TMtxVec.Normalize Method (double, double)

Normalize data.

Pascal
function Normalize(const SubOffset: double; const DivFactor: double): TMtxVec; overload;

Normalizes values in the calling object by subtracting a constant Offset from Elements and dividing the result by constant Factor: 

 

The results are stored in calling object. Use this method if you want to do a multiply and add (scale and offset) operations in a single method call.

var a: TVec; begin CreateIt(a); try a.SetIt(False,[1,2,3,4]); a.Normalize(2,3); finally FreeIt(a); end; end;
Examples on GitHub
Copyright (c) 1999-2025 by Dew Research. All rights reserved.
What do you think about this topic? Send feedback!