public Ring(int x, int y, int innerrad, int outerrad)
 {
     Inner = new Round(x, y, innerrad);
     Outer = new Round(x, y, outerrad);
 }
 public Ring(Round inner, Round outer)
 {
     Inner = new Round(inner);
     Outer = new Round(outer);
 }
 public Round(Round r) : this(r.X, r.Y, r.R) { }
        public static void Main(string[] args)
        {
			Round r1 = new Round(3, 5, 12);
			Console.WriteLine($"Area: {r1.Area}");
			Console.WriteLine($"Lenght: {r1.Lenght}");
        }
Exemple #5
0
        public double Length(Ring ring)
        {
            Round round = ring;

            return(Length(round) + (Math.PI * ring.InnerRadius * 2));
        }
Exemple #6
0
        public double Square(Ring ring)
        {
            Round round = ring;

            return(Square(round) - Math.PI * Math.Pow(ring.InnerRadius, 2));
        }
 public Round(Round r) : this(r.X, r.Y, r.R)
 {
 }