This website works better with JavaScript.
Home
Explore
Help
Register
Sign In
leo
/
LAPP_MY_BACKEND
Watch
2
Star
0
Fork
0
Code
Issues
0
Pull Requests
0
Projects
0
Releases
0
Wiki
Activity
Browse Source
添加Round方法
pull/2/head
zhangxin
4 years ago
parent
8400698dc6
commit
f81b89070e
1 changed files
with
7 additions
and
0 deletions
Split View
Diff Options
Show Stats
Download Patch File
Download Diff File
+7
-0
utils/utils.go
+ 7
- 0
utils/utils.go
View File
@ -5,6 +5,7 @@ import (
"fmt"
"github.com/lianggx6/goutf16"
"io"
"math"
"math/rand"
"net/http"
"os"
@ -386,4 +387,10 @@ func FileExist(file string) bool {
}
return
true
}
func
Round
(
num
float64
)
int
{
num
+=
0.5
num
=
math
.
Floor
(
num
)
return
int
(
num
)
}
Write
Preview
Loading…
Cancel
Save