You are here: Symbol Reference > clMtxVec Namespace > Classes > TOpenCLVector Class > public > TOpenCLVector.Rotate Method
MtxVec VCL
ContentsIndex
PreviousUpNext
TOpenCLVector.Rotate Method

A cyclic shift on vector elements.

Pascal
function Rotate(const Src: TOpenCLMtxVec; Offset: integer): TOpenCLVector; overload;

Performs cyclic shift on vector elements. The number of elements to shift is specified in the Offset parameter. Offset can be any integer number, positive or negative.

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