protected function getRandRange(minNum: Number, maxNum: Number):Number { return (Math.floor(Math.random() * (maxNum - minNum + 1)) + minNum); }
protected function getDistance(p1: Point, p2: Point): Number { var dx: Number = p1.x - p2.x; var dy: Number = p1.y - p2.y; return Math.sqrt(dx*dx + dy*dy); } |
No comments:
Post a Comment