18 lines
291 B
Go
18 lines
291 B
Go
package utils
|
|
|
|
// Min retourne le minimum de deux entiers
|
|
// Fonction utilitaire partagée pour éviter les duplications
|
|
func Min(a, b int) int {
|
|
if a < b {
|
|
return a
|
|
}
|
|
return b
|
|
}
|
|
|
|
// Max retourne le maximum de deux entiers
|
|
func Max(a, b int) int {
|
|
if a > b {
|
|
return a
|
|
}
|
|
return b
|
|
}
|