Documentation ¶
Index ¶
- func Abs[NumType SignedNumberType](Num NumType) NumType
- func Add[NumType NumberType](number1 NumType, number2 NumType) NumType
- func AddSafe[NumType NumberType](number1 NumType, number2 NumType) (NumType, bool)
- func Max[NumType NumberType](number1 NumType, number2 NumType) NumType
- func Min[NumType NumberType](number1 NumType, number2 NumType) NumType
- func Mul[NumType NumberType](number1 NumType, number2 NumType) NumType
- func MulSafe[NumType NumberType](number1 NumType, number2 NumType) (NumType, bool)
- func PercentRateSafe[NumType NumberType, OutNumType NumberType](maxValue int64, rate NumType, numbers ...NumType) (OutNumType, bool)
- func Sub[NumType NumberType](number1 NumType, number2 NumType) NumType
- func SubSafe[NumType NumberType](number1 NumType, number2 NumType) (NumType, bool)
- type FloatType
- type NumberType
- type SignedNumberType
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Abs ¶
func Abs[NumType SignedNumberType](Num NumType) NumType
func Add ¶ added in v1.18.6
func Add[NumType NumberType](number1 NumType, number2 NumType) NumType
func AddSafe ¶ added in v1.21.4
func AddSafe[NumType NumberType](number1 NumType, number2 NumType) (NumType, bool)
func Max ¶
func Max[NumType NumberType](number1 NumType, number2 NumType) NumType
func Min ¶
func Min[NumType NumberType](number1 NumType, number2 NumType) NumType
func Mul ¶ added in v1.18.6
func Mul[NumType NumberType](number1 NumType, number2 NumType) NumType
func MulSafe ¶ added in v1.21.4
func MulSafe[NumType NumberType](number1 NumType, number2 NumType) (NumType, bool)
func PercentRateSafe ¶ added in v1.21.4
func PercentRateSafe[NumType NumberType, OutNumType NumberType](maxValue int64, rate NumType, numbers ...NumType) (OutNumType, bool)
安全的求比例
func Sub ¶ added in v1.18.6
func Sub[NumType NumberType](number1 NumType, number2 NumType) NumType
func SubSafe ¶ added in v1.21.4
func SubSafe[NumType NumberType](number1 NumType, number2 NumType) (NumType, bool)
Types ¶
type NumberType ¶
Click to show internal directories.
Click to hide internal directories.