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

Normalize object.

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

Normalizes Vec object by subtracting a constant Offset from Vec 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,b: TOpenCLVector; begin CreateIt(a,b); try a.CopyFromArray(TSingleArray.Create(1,2,3,4)); b.Normalize(a,2,3); finally FreeIt(a,b); end; end;
Examples on GitHub
Copyright (c) 1999-2025 by Dew Research. All rights reserved.
What do you think about this topic? Send feedback!