You are here: Symbol Reference > clMtxExpr Namespace > Classes > clVector Record > public > Mag Method > clVector.Mag Method ()
MtxVec VCL
ContentsIndex
PreviousUpNext
clVector.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: clVector; begin a.CopyFromArray(TSingleArray.Create(1,-2,3,4)); // a = [1,-2, 3,4] a.Mag; // a = [1, 2, 3,4] end;
Examples on GitHub
Copyright (c) 1999-2024 by Dew Research. All rights reserved.
What do you think about this topic? Send feedback!