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

Method noise

src/main/java/field/linalg/Vec2.java:1408–1412  ·  view source on GitHub ↗

adds a uniformly distributed random number from `-amount` to `amount` to each dimension

(float amount)

Source from the content-addressed store, hash-verified

1406 * adds a uniformly distributed random number from `-amount` to `amount` to each dimension
1407 */
1408 public Vec2 noise(float amount) {
1409 x += 2 * amount * (Math.random() - 0.5f);
1410 y += 2 * amount * (Math.random() - 0.5f);
1411 return this;
1412 }
1413
1414 @Override
1415 public Object asMap_call(Object a, Object b) {

Callers 2

propagateMethod · 0.45
safeNormalizeFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected