Reading the full function here https://github.com/amix/photoshop/blob/2baca147594d01cf9d17d...
If I understand it correctly, it was calculating the top-left point of the bounding box.