From aa1b946f4ba9b62dee9b9464ff4450ebbc48c4ec Mon Sep 17 00:00:00 2001
From: liuxiaolong <736321739@qq.com>
Date: 星期四, 25 七月 2019 16:32:13 +0800
Subject: [PATCH] fix score to %.2f

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

diff --git a/extend/util/util.go b/extend/util/util.go
index cc2dd98..84e0527 100644
--- a/extend/util/util.go
+++ b/extend/util/util.go
@@ -189,4 +189,9 @@
 		}
 	}
 	return buffer.String()
+}
+
+func ParseScore(compareScore float32) float32 {
+	f, _ := strconv.ParseFloat(fmt.Sprintf("%.2f", compareScore*100), 32)
+	return float32(f)
 }
\ No newline at end of file

--
Gitblit v1.8.0