Added minmax function.
Tests ok
auto merge of #11789 : pongad/rust/master, r=kballard

All tests passing. #5268