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 ¶
func Add[NumType NumberType](number1 NumType, number2 NumType) NumType
func AddSafe ¶
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 ¶
func Mul[NumType NumberType](number1 NumType, number2 NumType) NumType
func MulSafe ¶
func MulSafe[NumType NumberType](number1 NumType, number2 NumType) (NumType, bool)
func PercentRateSafe ¶
func PercentRateSafe[NumType NumberType, OutNumType NumberType](maxValue int64, rate NumType, numbers ...NumType) (OutNumType, bool)
安全的求比例
func Sub ¶
func Sub[NumType NumberType](number1 NumType, number2 NumType) NumType
func SubSafe ¶
func SubSafe[NumType NumberType](number1 NumType, number2 NumType) (NumType, bool)
Types ¶
type NumberType ¶
Click to show internal directories.
Click to hide internal directories.