Skip to content

Latest commit

 

History

3 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

Python Intersecting Rectangles

A Python system to compare the oposite coordinates in 2 rectangles and determine if they intersect.

Features

  • Input top left and bottom right coordinates of 2 rectagles
  • Calculate all corner coodinates of the 2 rectangles
  • Algorithimcly determine if the 2 rectangles intercent
  • Buult in Unit Testing

Examples

Click to view overlapping example
Info for rectangle 1
Enter X coordinate 1 (top left)0
Enter Y coordinate 1 (top left)10
Enter X coordinate 2 (bottom right)10
Enter Y coordinate 2 (bottom right)0
Info for rectangle 2
Enter X coordinate 1 (top left)1
Enter Y coordinate 1 (top left)11
Enter X coordinate 2 (bottom right)9
Enter Y coordinate 2 (bottom right)-1
True
Click to view non overlapping example
Info for rectangle 1
Enter X coordinate 1 (top left)0
Enter Y coordinate 1 (top left)10
Enter X coordinate 2 (bottom right)10
Enter Y coordinate 2 (bottom right)0
Info for rectangle 2
Enter X coordinate 1 (top left)-5
Enter Y coordinate 1 (top left)10
Enter X coordinate 2 (bottom right)-1
Enter Y coordinate 2 (bottom right)0
False
Click to view testing results
  .................
  ----------------------------------------------------------------------
  Ran 17 tests in 0.000s

  OK

Requirements

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages