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

Method sampleAt

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

returns a position on this line that's `alpha` along it: specifically when `alpha=0` then we're at the start of the line, when `alpha=0.5` then we are in the middle, when `alpha=1.0` we're at the end.

(double alpha)

Source from the content-addressed store, hash-verified

1359
1360
1361 /**
1362 * returns a position on this line that's `distance` along it: specifically when `distance=0` then we're at the start of the line, when `alpha=0.5` then we are in the middle, when
1363 * `distance=line.length()` we're at the end.
1364 */
1365 public Vec3 sampleAtD(double distance) {
1366 FLinesAndJavaShapes.Cursor c = cursor();
1367 c.setD(distance);
1368 return c.position();

Callers

nothing calls this directly

Calls 6

cursorMethod · 0.95
setDMethod · 0.80
lengthDMethod · 0.80
positionMethod · 0.65
maxMethod · 0.45
minMethod · 0.45

Tested by

no test coverage detected