static float vary0to1(float x, float max default 0.1f) { return Math.max(0f, Math.min(1f, (float) (x+random(-max, max)))); }