Exemple #1
0
        static void Main(string[] args)
        {
            TPoint point = new TPoint(3, 2);

            point.print();
            point.reciprocal();
            point.print();
            point.reverse();
            point.print();

            //

            TSegment segment = new TSegment(new TPoint(1, 5), new TPoint(5, 2));

            segment.print();
            Console.WriteLine(segment.LE());
            Console.WriteLine(segment.LM());


            //


            TRasterSegment Rsegment = new TRasterSegment(new TPoint(1, 1), new TPoint(12, 23));

            Rsegment.print();

            //

            ComplexNumber c1 = new ComplexNumber(1, 1);

            c1.print();
            c1.reciprocal();
            c1.print();
            c1.reciprocal();
            c1.print();

            c1.moveXY(1, 2);

            Console.WriteLine(c1.getRel().ToString());
            Console.WriteLine(c1.getIm().ToString());



            ComplexNumber c2 = new ComplexNumber(2, 2);

            ComplexNumber c3 = c1 + c2;

            c3.print();

            c3 = c1 - c2;
            c3.print();

            c3 = c1 * c2;
            c3.print();

            c3 = c1 / c2;
            c3.print();

            FullComplexNumber fc = new FullComplexNumber();

            fc.setFromPolarForm(12, -1);
            fc.PrintPolarForm();

            fc.moveXY(-1, 10);
            fc.PrintEurelFormula();



            Console.ReadLine();
        }
Exemple #2
0
 public TRasterSegment(TPoint _first, TPoint _last)
 {
     first = _first;
     last  = _last;
     generate();
 }
 public TSegment(TPoint _first, TPoint _last)
 {
     first = _first;
     last  = _last;
 }
Exemple #4
0
 //Constructors are not inherited so I made them again
 public TRasterSegment()
 {
     first = new TPoint();
     last  = new TPoint();
     generate();
 }
        protected TPoint first, last;  //protected due to TRasterSegment

        //Constructors
        public TSegment()
        {
            first = new TPoint();
            last  = new TPoint();
        }