(it iter.Seq[ast.Constant])
| 1371 | } |
| 1372 | |
| 1373 | func evalFloatMax(it iter.Seq[ast.Constant]) (ast.Constant, error) { |
| 1374 | max := -1 * math.MaxFloat64 |
| 1375 | for c := range it { |
| 1376 | num, err := c.Float64Value() |
| 1377 | if err != nil { |
| 1378 | return ast.Constant{}, err |
| 1379 | } |
| 1380 | if num > max { |
| 1381 | max = num |
| 1382 | } |
| 1383 | } |
| 1384 | return ast.Float64(max), nil |
| 1385 | } |
| 1386 | |
| 1387 | func evalMin(it iter.Seq[ast.Constant]) (ast.Constant, error) { |
| 1388 | min := int64(math.MaxInt64) |
no test coverage detected