artist-rect-corners-squarify is a compiled Lisp function in `artist.el'.

(artist-rect-corners-squarify X1 Y1 X2 Y2)

Compute square corners from rectangle corners at X1, Y1 and X2, Y2.
The square's first corner will be X1, Y1. The position of the second
corner depends on which of X2 and Y2 is most far away from X1, Y1.