Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- pair<int,int> di={{1,0},{1,1},{0,1},{-1,1},{-1,0},{-1,-1},{0,-1},{1,-1}};
- // if you want to rotate +45 di[i+1] is the new direction else di[i-1] , i+1=(i+1+8)%8;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement