rotate method
Rotates stack elements between index
and the top of stack n
positions.
Positive values rotate towards the top of the stack and negative values rotate towards the bottom of the stack, Example:
state.pushAll(["a", "b", "c", "d"]);
state.rotate(-4, 1);
expect(state.values(4), equals(["d", "a", "b", "c"]));
state.rotate(-4, -3);
expect(state.values(4), equals(["c", "d", "a", "b"]));
Implementation
void rotate(int index, int n) => lua_rotate(L, index, n);