We should move this into the utils project in a Geometry object so we can import it elsewhere.