v0.0.552 mathext.ClampOpt
All checks were successful
Build Docker and Deploy / Run goext test-suite (push) Successful in 2m50s
All checks were successful
Build Docker and Deploy / Run goext test-suite (push) Successful in 2m50s
This commit is contained in:
@@ -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
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user