fork download
  1. using System;
  2.  
  3. public class Test
  4. {
  5. public static void DrawDragonFractal(Pixels pixels, int iterationsCount, int seed)
  6. {
  7. var random = new Random(seed);
  8. double x = 1.0;
  9. double y = 0.0;
  10.  
  11. for (int i = 0; i < iterationsCount; i++)
  12. {
  13. var xNew = (x * Math.Cos(45) - y * Math.Sin(45)) / Math.Sqrt(2);
  14. var yNew = (x * Math.Sin(45) + y * Math.Cos(45)) / Math.Sqrt(2);
  15. x = xNew;
  16. y = yNew;
  17.  
  18. pixels.SetPixel(x, y);
  19. }
  20. }
  21. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cs(5,42): error CS0246: The type or namespace name `Pixels' could not be found. Are you missing an assembly reference?
Compilation failed: 1 error(s), 0 warnings
stdout
Standard output is empty