all-corners function
all-corners: func [
{Returns all corners of the rectangle
given the upper-left and lower-right corners.}
ul [pair!] "The upper-left corner of the rectangle"
lr [pair!] "The bottom-right corner of the rectangle"
/local result
][
result: make block! 4
repend result [
ul
to-pair compose [(first ul) (second lr)] ;ur
to-pair compose [(first lr) (second ul)] ;ll
lr
]
return result
]
; example: all-corners 0x0 10x10