In this contest the contestants will submit a function that takes two (axis-aligned) rectangle objects as parameters and returns whether they intersect or not.
The rectangle object may be defined as either two points, or one point (the center) and the width and height.
On my computer, I will construct benchmarks by creating lots of random rectangles and testing if they intersect using each contestant's method. Whichever method takes the least amount of time wins.
Your method/function may be in any programming language you want. Of course I need to be able to run it on my computer so don't use imaginary languages or ones whose runtimes are otherwise unobtainable.
In the end I will submit my own method too.
The contest will end whenever enough entries have been submitted. Get started!
The rectangle object may be defined as either two points, or one point (the center) and the width and height.
On my computer, I will construct benchmarks by creating lots of random rectangles and testing if they intersect using each contestant's method. Whichever method takes the least amount of time wins.
Your method/function may be in any programming language you want. Of course I need to be able to run it on my computer so don't use imaginary languages or ones whose runtimes are otherwise unobtainable.
In the end I will submit my own method too.
The contest will end whenever enough entries have been submitted. Get started!