mirror of
https://github.com/livekit/livekit.git
synced 2026-04-23 13:46:08 +00:00
add more types to signum (#4473)
This commit is contained in:
@@ -34,7 +34,7 @@ func Median[T float32](input []T) T {
|
||||
return (left + right) / 2
|
||||
}
|
||||
|
||||
func Signum[T int | int32 | float32](val T) int {
|
||||
func Signum[T int | int8 | int16 | int32 | int64 | float32 | float64](val T) int {
|
||||
switch {
|
||||
case val < 0:
|
||||
return -1
|
||||
|
||||
Reference in New Issue
Block a user