Method writter to reverse array of doubles.