(x any)
| 140 | } |
| 141 | |
| 142 | func Round(x any) any { |
| 143 | switch x := x.(type) { |
| 144 | case float32: |
| 145 | return math.Round(float64(x)) |
| 146 | case float64: |
| 147 | return math.Round(x) |
| 148 | case int, int8, int16, int32, int64, uint, uint8, uint16, uint32, uint64: |
| 149 | return Float(x) |
| 150 | } |
| 151 | panic(fmt.Sprintf("invalid argument for round (type %T)", x)) |
| 152 | } |
| 153 | |
| 154 | func Int(x any) any { |
| 155 | switch x := x.(type) { |