Go int8 int16 int32 int64 Max and Min function implementation

Go int8 int16 int32 int64 Max and Min function implementation

func Min(a, b int8) int8 {
    if a < b {
        return a
    }
    return b
}

func Max(a, b int8) int8 {
    if a > b {
        return a
    }
    return b
}

func Min(a, b int16) int16 {
    if a < b {
        return a
    }
    return b
}

func Max(a, b int16) int16 {
    if a > b {
        return a
    }
    return b
}

func Min(a, b int32) int32 {
    if a < b {
        return a
    }
    return b
}

func Max(a, b int32) int32 {
    if a > b {
        return a
    }
    return b
}

func Min(a, b int64) int64 {
    if a < b {
        return a
    }
    return b
}

func Max(a, b int64) int64 {
    if a > b {
        return a
    }
    return b
}

Comments

Popular posts from this blog

Python Receiving and parse JSON Data via UDP protocol

ubus lua client method and event registration code demo/example