int is_square(rectangle r) { int height, width; width = r.ur.x - r.ll.x; height = r.ur.y - r.ll.y; /* The rectangle is a square if the width and height are the same, ** (width==height) will be 1 if they're equal, 0 otherwise. */ return (width == height); }