Point topRight(Point origin)

The point at the intersection of the top and right edges of the rectangle described by the given point (which is interpreted as the top-left corner) and this size.

See also Rect.topRight.

Source

Point topRight(Point origin) => new Point(origin.x + width, origin.y);