Add convenience method to CGRect for getting position in a rect
NickEntin opened this issue · 1 comments
NickEntin commented
We currently have a Position.point(in:)
method to get the point at that position in the rect. This works well when you have the position already (e.g. as a parameter), but is a bit cumbersome when you don't, since it requires the full type.
let _ = Position.center.point(in: rect)
We should add a CGRect.point(at:)
convenience method that calls through to this same logic, matching the existing UIView.point(at:)
method.
rect.point(at: .center)
NickEntin commented
Now that we support layout directions, we'll also need a layoutDirection: UIUserInterfaceLayoutDirection
parameter.