(float[] source, int length)
| 508 | |
| 509 | |
| 510 | public static float[] copyOf(float[] source, int length) { |
| 511 | float[] target = new float[length]; |
| 512 | for (int i = 0; i < target.length; i++) { |
| 513 | if (i > source.length - 1) |
| 514 | target[i] = 0f; |
| 515 | else |
| 516 | target[i] = source[i]; |
| 517 | } |
| 518 | return target; |
| 519 | } |
| 520 | |
| 521 | |
| 522 | public static byte[] copyOf(byte[] source, int length) { |
no outgoing calls
no test coverage detected