Miscellany
public c v1 · immutable//returns a long containing the x and y rotated points as wordslong pointrot(short x, short y, short centerx, short centery, short rotate) { //convert to coords based off polygon center as origin short newx=x-centerx; short newy=y-centery; //xcos(t)-y*sin(t) newx=((newx*sin128(90-rotate))/128)-((newy*sin128(rotate))/128); newy=((newx*sin128(rotate))/128)+((newy*sin128(90-rotate))/128); //convert back to LCD screen coords return ((long)(newx+centerx)<<16)+(newy+centery);}