Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private static IEnumerable<Point> RandomPoints(int size)
- {
- var rnd = new Random();
- for (int i = 0; i < size; i++)
- yield return new Point { x = rnd.Next(), y = rnd.Next(), z = rnd.Next() };
- }
- static void Main(string[] args)
- {
- var stopwatch = new Stopwatch();
- var points = RandomPoints(10000).ToArray();
- stopwatch.Start();
- int[] ids = Color.Map(points, 150f);
- stopwatch.Stop();
- Console.WriteLine(stopwatch.ElapsedMilliseconds);
- Console.ReadKey();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement