Skip to content

use golang built-in functions rather than mathutil #56594

@lance6716

Description

@lance6716

Enhancement

like we can use max rather than

// Max returns the largest one from its arguments.
func Max[T constraints.Ordered](x T, xs ...T) T {
maxv := x
for _, n := range xs {
if n > maxv {
maxv = n
}
}
return maxv
}

Metadata

Metadata

Assignees

Labels

good first issueDenotes an issue ready for a new contributor, according to the "help wanted" guidelines.hacktoberfesttype/enhancementThe issue or PR belongs to an enhancement.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions