新增权重随机相关函数

This commit is contained in:
duanhf2012
2024-09-11 14:50:31 +08:00
parent 73d384361d
commit 7116b509e9
3 changed files with 132 additions and 91 deletions

25
util/typedef/type.go Normal file
View File

@@ -0,0 +1,25 @@
package typedef
type Signed interface {
~int | ~int8 | ~int16 | ~int32 | ~int64
}
type Unsigned interface {
~uint | ~uint8 | ~uint16 | ~uint32 | ~uint64
}
type Float interface {
~float32 | ~float64
}
type Integer interface {
Signed|Unsigned
}
type Number interface {
Signed|Unsigned
}
type Ordered interface {
Number|Float|~string
}