Not sure what I'm doing wrong here so I was looking to see if anyone had any thoughts or suggestions. I'm trying to create a function that returns a random point WITHIN a circle. The following code gives me random points along the edge of the circle. Any thoughts on what I'm doing wrong here? Thanks!
private function getPointInCircle(tmpRadius:int):Point {
var x:int;
var y:int;
var a:Number = Math.random() * 360;
x = radius * Math.cos(a * (Math.PI / 180));
y = radius * Math.sin(a * (Math.PI / 180));
trace("x: " + x + "y: " + y);
return new Point(x, y);
}