In order to you to “return” several value, you need to use “array”. “array” is like a folder, you can put several value in this folder and call it when you need.
public double[] CalcRecCoor0(double width, double length, double InitialX, double InitialY)
 {
    double X0 = InitialX;
    double Y0 = InitialY;
    double X1 = InitialX;
    double Y1 = InitialY + length;
    double X2 = InitialX + width;
    double Y2 = InitialY + length;
    double X3 = InitialX + width;
    double Y3 = InitialY;

    double[] Position0 = new double[8] { X0, Y0, X1, Y1, X2, Y2, X3, Y3 };

    return Position0;

 }

What is Array??

One thought on “How to use “Return” with several output

Leave a Reply