public void Generate(byte count) { _count = count; _nodes.Clear(); float angleBetween; angleBetween = (float)(Math.PI * 2) / count; for (int i = 0; i < count; i++) { Vector2 _velocity = new Vector2(((float)Globals.GlobalRandom.NextDouble() * 2f), 0); _velocities.Add(CompareF.RotateVector2(_velocity, angleBetween * i)); } _nodes = _circle.DidvideCircle(count); _nodes.AddRange(_circle.DidvideCircle(count)); CircleF _n = new CircleF(_circle.Center, _circle.Radius - 6); _nodes.AddRange(_n.DidvideCircle(count)); _nodes.AddRange(_n.DidvideCircle(count)); }
public static bool IsVector2InCircleF(Vector2 vector, CircleF circle) { if (circle != null) { if ( ( ((circle.Center.X - vector.X) * (circle.Center.X - vector.X)) + ((circle.Center.Y - vector.Y) * (circle.Center.Y - vector.Y))) <= (circle.Radius * circle.Radius) ) { return(true); } return(false); } else { return(false); } }
public static bool RectangleFVsCircleF(CircleF circle, RectangleF rectangle) { return(RectangleFVsCircleF(rectangle, circle)); }
public static bool IsVector2InCircleF(CircleF circle, Vector2 vector) { return(IsVector2InCircleF(vector, circle)); }