New Paste :: Recent Pastes:: No Line Numbers

rotate by DELTRON

1

// given a point (x,y), to find a new point (newx,newy) rotated around a given center by 'degrees': dx = aboutx - x; dy = abouty - y; newx = dx * cos(degrees) - dy * sin(degrees) + aboutx; newy = dx * sin(degrees) + dy * cos(degrees) + abouty;