@univerjs/core v0.5.0-beta.1 • 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
packages/api/tmp/univer-pro/submodules/univer/packages/core/src/common/array.ts:60