MCPcopy Index your code
hub / github.com/processing/processing / copyOf

Method copyOf

core/src/processing/opengl/LinePath.java:510–519  ·  view source on GitHub ↗
(float[] source, int length)

Source from the content-addressed store, hash-verified

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) {

Callers 4

needRoomMethod · 0.95
addBezierVertexMethod · 0.80
addQuadraticVertexMethod · 0.80
addCurveVertexSegmentMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected