Home
last modified time | relevance | path

Searched refs:minStep (Results 1 – 1 of 1) sorted by relevance

/development/samples/ApiDemos/src/com/example/android/apis/graphics/
DWindowSurface.java102 void init(int width, int height, float minStep) { in init() argument
105 dx = (float)(Math.random()*minStep*2) + 1; in init()
106 dy = (float)(Math.random()*minStep*2) + 1; in init()
109 float adjDelta(float cur, float minStep, float maxStep) { in adjDelta() argument
110 cur += (Math.random()*minStep) - (minStep/2); in adjDelta()
111 if (cur < 0 && cur > -minStep) cur = -minStep; in adjDelta()
112 if (cur >= 0 && cur < minStep) cur = minStep; in adjDelta()
118 void step(int width, int height, float minStep, float maxStep) { in step() argument
123 dx = adjDelta(-dx, minStep, maxStep); in step()
129 dy = adjDelta(-dy, minStep, maxStep); in step()