Texture uv rotation in tile texture atlas

I’m using the texture below. for terrain

I want to display and rotate the texture at a specific index.

Finding the uv offset using a specific index is a success, but I do not know how to rotate it.

The [CustomRotator][1] rotates the texture itself, which is not what I want.

Is there a way to rotate only the texture at a specific index?