Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // aux = rectangulo vazio (variavel auxiliar)
- // newrec = criar rectangulo
- If( r1.c > r2.c ):
- aux = r1
- r1 = r2
- r2 = aux
- If( r2.a > r1.c
- or r2.c < r1.a
- or r2.d > r1.b
- or r2.b < r1.d
- ):
- return None
- else:
- newrec( max(r1.a, r2.a), max(r1.b, r2.b), min(r1.c, r2.c), min(r1.d, r2.d))
Add Comment
Please, Sign In to add comment