MCPcopy Create free account
hub / github.com/OpenEndedGroup/Field2 / fromSampling

Method fromSampling

src/main/java/field/graphics/FLine.java:582–590  ·  view source on GitHub ↗

calls function 'fun' with a parameter that goes from 0 -> 1 (inclusive) in 'samples' steps. Then hands the results to `data('t ', ...)`

(Function<Double, Object> fun, int samples)

Source from the content-addressed store, hash-verified

580 rr.add(o);
581 }
582 return data("t*", rr);
583 }
584
585
586 /**
587 * This takes a list of "things" and successively transforms them into a list of (list of...) Vec3 or Vec2. Each of the transformation rules are tried in turn (and in order) and anything that
588 * returns non-null terminates the transformation for that "turn". Collections are understood. All exceptions are suppressed inside the .apply method of these transformations.
589 * <p>
590 * If, after all this, you have a List of Vec2 or Vec3 then you get a single line, otherwise a List of List of Vec2 or Vec3 gets you a group of lines
591 */
592 public FLine dataLines(Collection<Object> input, Function<Object, Object>... transformation) {
593 List<Object> m = transform(input, transformation);

Callers

nothing calls this directly

Calls 3

dataMethod · 0.95
applyMethod · 0.65
addMethod · 0.45

Tested by

no test coverage detected