
Here are the comments on how to use the function, its easy.
// Helper function to rotate a graphic token around any one of nine pivot points
//
// copyright pug games 2014
// please feel free to use this function, change it, add to it in any way you feel
// functions created by Roll20 user Konrad J.
//
// to use these helper functions in your own script you need all three, trueRotation, getPoints, and processRotation.
// the only function you need to call in your own script is processRotation. You need to pass it
// pivotPoint, degToRotate, and the id of a graphic token you want to rotate
// processRotation returns true if it could find the token and false if it could not
//
// pivotPoint is a string, one of nine points on a token
// topLeft, topMid, topRight, midLeft, midMid (centre), midRight, botLeft, botMid, botRight
// tl, tm, tr, ml, mm, mr, bl, bm, br
//
// tl--tm--tr
// | |
// ml--mm--mr
// | |
// bl--bm--br
//
// degToRotate is a number, the degrees to rotate can be 0 to 360 to rotate clockwise and -0 to -360 to rotate counterclockwise
//
https://gist.github.com/morval/9580719
PS: How do you make it so the code shows in the post? I've tried both Github and a Github Gist, but my don't seem to show up?