MCPcopy Create free account
hub / github.com/OpenSourcePhysics/osp / initialize

Method initialize

src/csm/ch03/Demo3D_5App.java:44–54  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

42 }
43
44 @Override
45public void initialize() {
46 x = (max-min)*(Math.random()-0.5);
47 y = (max-min)*(Math.random()-0.5);
48 z = (max-min)*(Math.random()-0.5);
49 vx = (max-min)*(Math.random()-0.5);
50 vy = (max-min)*(Math.random()-0.5);
51 vz = (max-min)*(Math.random()-0.5);
52 ball.setXYZ(x, y, z);
53 trail.clear();
54 }
55
56 /**
57 * Does an animation step.

Callers

nothing calls this directly

Calls 2

setXYZMethod · 0.65
clearMethod · 0.65

Tested by

no test coverage detected