123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172 |
- package utils
- var UtimesNumberMap = map[string]int{
- "一": 1,
- "二": 2,
- "三": 3,
- "四": 4,
- "五": 5,
- "六": 6,
- "七": 7,
- "八": 8,
- "九": 9,
- "十": 10,
- "两": 2,
- "1": 1,
- "2": 2,
- "3": 3,
- "4": 4,
- "5": 5,
- "6": 6,
- "7": 7,
- "8": 8,
- "9": 9,
- "10": 10}
- //返回最小值 int
- func MinIntBetween(left int, right int) int {
- if left <= right {
- return left
- }
- return right
- }
- //返回最小值 int64
- func MinInt64Between(left int64, right int64) int64 {
- if left <= right {
- return left
- }
- return right
- }
- //返回最大值 int
- func MaxIntBetween(left int, right int) int {
- if left >= right {
- return left
- }
- return right
- }
- //返回最大值 int64
- func MaxInt64Between(left int64, right int64) int64 {
- if left >= right {
- return left
- }
- return right
- }
- //返回最大值 Float64
- func MinFloat64Between(left float64, right float64) float64 {
- if left >= right {
- return right
- }
- return left
- }
- //返回最小值 Float64
- func MaxFloat64Between(left float64, right float64) float64 {
- if left <= right {
- return right
- }
- return left
- }
|