(float w, float h)
| 40 | } |
| 41 | |
| 42 | @NotNull @Contract("_, _ -> new") |
| 43 | public static Rect makeWH(float w, float h) { |
| 44 | if (w < 0) |
| 45 | throw new IllegalArgumentException("Rect::makeWH expected w >= 0, got: " + w); |
| 46 | if (h < 0) |
| 47 | throw new IllegalArgumentException("Rect::makeWH expected h >= 0, got: " + h); |
| 48 | return new Rect(0, 0, w, h); |
| 49 | } |
| 50 | |
| 51 | @NotNull @Contract("_, _ -> new") |
| 52 | public static Rect makeWH(@NotNull Point size) { |