You are here: Symbol Reference > AbstractMtxVecInt Namespace > Classes > TMtxVecInt Class > public > Abs Method > TMtxVecInt.Abs Method ()
MtxVec VCL
ContentsIndex
PreviousUpNext
TMtxVecInt.Abs Method ()

Absolute values.

Pascal
function Abs: TMtxVecInt; overload;

Calculate the absolute value of all calling object elemets in-place.

Uses MtxVecInt; procedure Example; var a: TVecInt; begin CreateIt(a); a.SetIt([1,-2,3,4]); a.Abs; // a = [1,2,3,4] FreeIt(a); end;
Examples on GitHub
Copyright (c) 1999-2024 by Dew Research. All rights reserved.
What do you think about this topic? Send feedback!