public static double[] sortDoubles(double[] doubles, String sens) {
        double temp;
        
        if(sens == "asc" || sens == "desc") {

            for(int i1 = 0; i1 < doubles.length; i1++) {

                for(int i2 = 0; i2 < doubles.length; i2++) {

                    switch(sens) {

                        case "desc" :
                            if(doubles[i2] < doubles[i1]) {
                                temp = doubles[i2];
                                doubles[i2] = doubles[i1];
                                doubles[i1] = temp;
                            }
                            break;

                        case "asc" :
                            if(doubles[i2] > doubles[i1]) {
                                temp = doubles[i2];
                                doubles[i2] = doubles[i1];
                                doubles[i1] = temp;
                            }
                            break;
                    }
                }
            }

            return doubles;
        }
        
        else return doubles;
        
    }