v0.0.552 mathext.ClampOpt
All checks were successful
Build Docker and Deploy / Run goext test-suite (push) Successful in 2m50s

This commit is contained in:
2025-01-05 03:40:15 +01:00
parent f7b4aa48d7
commit d009aafd4e
5 changed files with 38 additions and 16 deletions

View File

@@ -87,13 +87,3 @@ func Abs[T langext.NumberConstraint](v T) T {
return v
}
}
func Clamp[T langext.NumberConstraint](v T, min T, max T) T {
if v < min {
return min
} else if v > max {
return max
} else {
return v
}
}