Advertisement
Jacobacon215

Untitled

Sep 11th, 2019
140
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.50 KB | None | 0 0
  1. pX = int(input("x pre-coord: "))
  2. pY = int(input("y pre-coord: "))
  3. rot = input("rotation direction: ")
  4. deg = int(input("degrees: "))
  5. rep = deg / 90
  6.  
  7. finX = pX
  8. finY = pY
  9.  
  10.  ## change the flipping to an even or odd value code to determine flipping
  11. if rot == counterclockwise:
  12.     while rep != 0:
  13.         if pX > 0 and pY > 0:
  14.             pX = pY
  15.             pY = pX
  16.             pX = pX * -1
  17.         elif pX < 0 and pY > 0:
  18.             pX = pY
  19.             pY = pX
  20.             pY = pY * -1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement