The Ds\Deque::rotate() function is an inbuilt function in PHP which is used to rotate the elements of Deque by the given number of rotations.
public Ds\Deque::rotate( $rotations ) : void
Parameters: This function accepts single parameter $rotations which holds the number of rotation of the elements in Deque is to be rotated.
Return value: This function does not return any value.
Below programs illustrate the Ds\Deque::rotate() function in PHP:
Elements of Deque Ds\Deque Object (  => 1  => 2  => 3  => 4  => 5  => 6 ) Rotated Deque Ds\Deque Object (  => 3  => 4  => 5  => 6  => 1  => 2 )
Elements of Deque Ds\Deque Object (  => geeks  => for  => geeks  => practice ) Rotated Deque Ds\Deque Object (  => geeks  => practice  => geeks  => for )
- CSS | hue-rotate() Function
- p5.js | rotate() function
- CSS | rotate() Function
- PHP | Ds\Vector rotate() Function
- PHP | ImagickDraw rotate() Function
- PHP | Ds\Sequence rotate() Function
- Node Jimp | rotate
- Rotate a polygon by given degrees in p5.js
- HTML canvas rotate() Method
- How to get the function name inside a function in PHP ?
- PHP | key() Function
- PHP | Ds\Set add() Function
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to firstname.lastname@example.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.