// // 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{_e :=make ([]float64 ,len (array ));copy (_e ,array );return _e ;};_g :=len (array )/2;_a :=MergeSort (array [:_g ]);_b :=MergeSort (array [_g :]);_d :=make ([]float64 ,len (array ));_dd :=0;_ad :=0;_fg :=0;for _ad < len (_a )&&_fg < len (_b ){if _a [_ad ]<=_b [_fg ]{_d [_dd ]=_a [_ad ];_ad ++;}else {_d [_dd ]=_b [_fg ];_fg ++;};_dd ++;};for _ad < len (_a ){_d [_dd ]=_a [_ad ];_ad ++;_dd ++;};for _fg < len (_b ){_d [_dd ]=_b [_fg ];_fg ++;_dd ++;};return _d ;};