コード例 #1
0
ファイル: Form1.cs プロジェクト: Maurdekye/Misc-Projects
 public static PointF RandomInUnitCircle()
 {
     double Angle = RandomFloat() * Math.PI * 2f;
     double Distance = Math.Sqrt(RandomFloat());
     PointF AtPerimiter = new PointF((float)Math.Sin(Angle), (float)Math.Cos(Angle));
     return AtPerimiter.Times((float)Distance);
 }