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

Magnitude.

Pascal
function Mag: TOpenCLMtxVec; overload;

Calculate the magnitude for all calling object elements in-place. This method has the same function as the Abs method.

var a: TOpenCLVector; begin CreateIt(a); try a.CopyFromArray(TSingleArray.Create(1,-2,3,4)); // a = [1,-2, 3,4] a.Mag; // a = [1, 2, 3,4] 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!