(a, b T)
| 175 | } |
| 176 | |
| 177 | func Ascending[T constraints.Ordered](a, b T) int { |
| 178 | if a < b { |
| 179 | return -1 |
| 180 | } else if a == b { |
| 181 | return 0 |
| 182 | } |
| 183 | return 1 |
| 184 | } |
| 185 | |
| 186 | func Descending[T constraints.Ordered](a, b T) int { |
| 187 | return -Ascending[T](a, b) |
no outgoing calls