Code example for Random

Methods: nextGaussian, nextInt

0
				mCounter--;
			} 
		} 
		 
		public void randomAngle() { 
			setAngle( Math.PI / 2 + RNG.nextInt(2) * Math.PI + Math.PI / 2 * RNG.nextGaussian() );
		} 
		 
		public void setAngle(double angle) {
			mAngle = angle % (2 * Math.PI);
			mAngle = boundAngle(mAngle);
			findVector(); 
		} 
		 
		public void draw(Canvas canvas) {
	        if((mCounter / 10) % 2 == 1 || mCounter == 0)
	        	canvas.drawCircle(x, y, Ball.RADIUS, mPaint);
		} 
		 
		/** 
		 * Tells us if the ball collides with a rectangle.