From e48fa53ee149c1019bea582be96ef8778ec813e0 Mon Sep 17 00:00:00 2001
From: liuxiaolong <736321739@qq.com>
Date: 星期三, 20 十一月 2019 17:32:53 +0800
Subject: [PATCH] fix score

---
 extend/util/util.go |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/extend/util/util.go b/extend/util/util.go
index 542dd2c..d5180d0 100644
--- a/extend/util/util.go
+++ b/extend/util/util.go
@@ -173,6 +173,14 @@
 	return float32(f)
 }
 
+func ParseScore64(compareScore float64) float64 {
+	if compareScore < 1 {
+		compareScore = compareScore * 100
+	}
+	f, _ := strconv.ParseFloat(fmt.Sprintf("%2.2f", compareScore), 64)
+	return f
+}
+
 // UnCompress uncompress
 func UnCompress(in []byte) ([]byte, error) {
 	out := make([]byte, 10*len(in))

--
Gitblit v1.8.0