From 284a3e5bdc3948e78d017e02f659992826b983bd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8B=8F=E5=B0=B9=E5=B2=9A?= <770236076@qq.com> Date: Wed, 25 Dec 2019 11:50:45 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E4=B8=80=E4=B8=AA=E8=BD=AC?= =?UTF-8?q?=E6=8D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- utils/typeconv.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/utils/typeconv.go b/utils/typeconv.go index d24f4a77..51d75ec0 100644 --- a/utils/typeconv.go +++ b/utils/typeconv.go @@ -534,3 +534,7 @@ func IntSlice2Int64(intList []int) (outList []int64) { } return outList } + +func Int2Float64(i int) (f float64) { + return Str2Float64(Int64ToStr(int64(i))) +}