Skip to content
Discussion options

You must be logged in to vote

You in fact have all freedom you need - just use the notation that suits you best.

  1. This r1.intersect(r2) logic is the same as implemented in the base library.
  2. There exists algebra notation for all geometry objects which lets you say r = r1 & r2. Here, the two original rectangles remain unchanged.
  3. You can also write r1 = r1 & r2 which obviously replaces r1 with result and is exactly the same as r1 &= r2 and corresponds to r1.intersect(r2).

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by imntl
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants