Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- static void Main(string[] args)
- {
- var points = new List<Point>();
- points.Add(new Point
- {
- X = 1,
- Y = 2
- });
- points.Add(new Point
- {
- X = 0.5,
- Y = -0.25
- });
- points.Add(new Point
- {
- X = 0.5,
- Y = 0.5
- });
- points.Add(new Point
- {
- X = -1,
- Y = -2
- });
- var points1 =
- from Point pt in points
- where ((pt.X * pt.X) + (pt.Y * pt.Y)) <=1
- orderby pt.Y descending
- select pt;
- foreach (var item in points1)
- {
- Console.WriteLine("{0} {1}",item.X, item.Y);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement