Code example for Random

Methods: nextGaussian

0
 
  private Paint paint;
 
  private boolean screenSaver = false;
 
  private Random r = new Random();
 
  private float vF = 0.5f;
  private float hF = 0.5f;
 
  private double moveVStep = (r.nextGaussian() * 0.01d);
  private double moveHStep = (r.nextGaussian() * 0.01d);
 
  private Rect boundingBox = new Rect(0, 0, 0, 0);
 
  public DisplayView(Context context) {
    super(context);
    initComponents(); 
  } 
 
  public DisplayView(Context context, AttributeSet attrs) {