@univerjs/core v0.4.2 • Docs
Function: rotate()
function rotate<T>(arr, steps): readonly T[]
Rotate an array without mutating the original array.
Type Parameters
Type Parameter |
---|
T |
Parameters
Parameter | Type | Description |
---|---|---|
arr | readonly T [] | the array to be rotated |
steps | number | how many steps to rotate |
Returns
readonly T
[]
the rotated array, it is another array, the original array is not mutated.
Defined in
submodules/univer/packages/core/src/common/array.ts:60 (opens in a new tab)