Skip to content

Commit

Permalink
修复数学公式问题
Browse files Browse the repository at this point in the history
  • Loading branch information
steden committed Apr 10, 2024
1 parent 25955d3 commit 801b8b1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions operator/math.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,6 @@ func GetTail(num int) int {

// GetHead 取数字第一位数
func GetHead(num int) int {
strNum := parse.Convert(num, "")
return parse.ToInt(strNum[0])
n:=string(parse.ToString(num)[0])
return parse.ToInt(n)
}

0 comments on commit 801b8b1

Please sign in to comment.