(@Nullable Point[] pts)
| 14 | public final float _y; |
| 15 | |
| 16 | @Contract("null -> null; !null -> new") |
| 17 | public static @Nullable float[] flattenArray(@Nullable Point[] pts) { |
| 18 | if (pts == null) return null; |
| 19 | float[] arr = new float[pts.length * 2]; |
| 20 | for (int i = 0; i < pts.length; ++i) { |
| 21 | arr[i * 2] = pts[i]._x; |
| 22 | arr[i * 2 + 1] = pts[i]._y; |
| 23 | } |
| 24 | return arr; |
| 25 | } |
| 26 | |
| 27 | @Contract("null -> null; !null -> new") |
| 28 | public static @Nullable Point[] fromArray(@Nullable float[] pts) { |
no outgoing calls
no test coverage detected