asad.awadia
04/16/2019, 12:20 PMCzar
04/16/2019, 12:57 PMasad.awadia
04/16/2019, 4:22 PMCzar
04/16/2019, 4:40 PMr4zzz4k
04/16/2019, 5:02 PMval point1 = Point(1, 3)
val point2 = Point(7, 8)
val size: Size(2, 2)
// ...
val rect1 = point1 rectTo point2
val rect2 = point1 rectOfSize size
val rect3 = point2 centeredRectOfSize size
Czar
04/16/2019, 6:03 PMr4zzz4k
04/16/2019, 6:04 PMCzar
04/16/2019, 6:22 PMto
My main point is, code is code, don't try to make it into something else just for the sake of it. Sometimes it is warranted, but often - it is not.