gutil

package
v1.0.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 19, 2022 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Abs

func Abs(v int32) int32

func Ceil

func Ceil(v float32) int32

func FindRangeValue

func FindRangeValue(list interface{}, value int32) interface{}

根据一个范围,获取到值 list := []struct{{int32,int32,interface{}}}

func MaxFloat32

func MaxFloat32(a, b float32) float32

func MaxInt32

func MaxInt32(a, b int32) int32

func MaxInt64

func MaxInt64(a, b int64) int64

func MinFloat32

func MinFloat32(a, b float32) float32

func MinInt32

func MinInt32(a, b int32) int32

func MinInt64

func MinInt64(a, b int64) int64

func Round

func Round(v float32) int32

func SliceDelInt32

func SliceDelInt32(arr []int32, value int32) []int32

func SliceDelInt64

func SliceDelInt64(arr []int64, value int64) []int64

func SliceInt32Member

func SliceInt32Member(value int32, arr []int32) bool

func Sort

func Sort(list interface{}, cmp cmpFunc, swap swapFunc)

排序

只是一个sort.Sort函数的封装,使得不需要使用接口

由于包装了一层,所以效率会比sort.Sort慢2.5倍左右

func Trunc

func Trunc(v float32) int32

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL