Skip to content

Instantly share code, notes, and snippets.

@PedroRacchetti
Created July 27, 2021 14:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save PedroRacchetti/75db1978513a922c5b1bc951802718ea to your computer and use it in GitHub Desktop.
Save PedroRacchetti/75db1978513a922c5b1bc951802718ea to your computer and use it in GitHub Desktop.
Pt rotate(double ang /* angulo, em radianos*/){
double xb = x * cos(ang) - y * sin(ang);
double yb = x * sin(ang) + y * cos(ang);
return Pt(xb,yb);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment