You are here: Symbol Reference > clMtxExpr Namespace > Classes > clVector Record > public > Rotate Method > clVector.Rotate Method (TOpenCLMtxVec, integer)
MtxVec VCL
ContentsIndex
PreviousUpNext
clVector.Rotate Method (TOpenCLMtxVec, integer)

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: clVector; begin a.CopyFromArray(TSingleArray.Create(1,2,3,4)); b.Rotate(a, 2); // b = [3,4,1,2] end;
Examples on GitHub
Copyright (c) 1999-2025 by Dew Research. All rights reserved.
What do you think about this topic? Send feedback!