// // Copyright 2020 FoxyUtils ehf. All rights reserved. // // This is a commercial product and requires a license to operate. // A trial license can be obtained at https://unidoc.io // // DO NOT EDIT: generated by unitwist Go source code obfuscator. // // Use of this source code is governed by the UniDoc End User License Agreement // terms that can be accessed at https://unidoc.io/eula/ package mergesort ;func MergeSort (array []float64 )[]float64 {if len (array )<=1{_d :=make ([]float64 ,len (array ));copy (_d ,array );return _d ;};_a :=len (array )/2;_g :=MergeSort (array [:_a ]);_ac :=MergeSort (array [_a :]);_e :=make ([]float64 ,len (array )); _da :=0;_ec :=0;_ab :=0;for _ec < len (_g )&&_ab < len (_ac ){if _g [_ec ]<=_ac [_ab ]{_e [_da ]=_g [_ec ];_ec ++;}else {_e [_da ]=_ac [_ab ];_ab ++;};_da ++;};for _ec < len (_g ){_e [_da ]=_g [_ec ];_ec ++;_da ++;};for _ab < len (_ac ){_e [_da ]=_ac [_ab ]; _ab ++;_da ++;};return _e ;};