package
0.0.0-20241116165817-883d5d7d379c
Repository: https://github.com/ddkwork/toolbox.git
Documentation: pkg.go.dev
# Functions
Abs returns the absolute value of x.
Acos returns the arccosine of x.
Acosh returns the inverse hyperbolic cosine of x.
Asin returns the arcsine, in radians, of x.
Asinh returns the inverse hyperbolic sine of x.
Atan returns the arctangent, in radians, of x.
Atan2 returns the arc tangent of y/x, using the signs of the two to determine the quadrant of the return value.
Atanh returns the inverse hyperbolic tangent of x.
Cbrt returns the cube root of x.
Ceil returns the smallest integer value greater than or equal to x.
Copysign returns a value with the magnitude of x and the sign of y.
Cos returns the cosine of the radian argument x.
Cosh returns the hyperbolic cosine of x.
Dim returns the maximum of x-y or 0.
EqualWithin returns true if a and b are within the given tolerance of each other.
Erf returns the error function of x.
Erfc returns the complementary error function of x.
Erfcinv returns the inverse of Erfc(x).
Erfinv returns the inverse error function of x.
Exp returns e**x, the base-e exponential of x.
Exp2 returns 2**x, the base-2 exponential of x.
Expm1 returns e**x - 1, the base-e exponential of x minus 1.
Floor returns the greatest integer value less than or equal to x.
FMA returns x * y + z, computed with only one rounding.
Frexp breaks f into a normalized fraction and an integral power of two.
Gamma returns the Gamma function of x.
Hypot returns Sqrt(p*p + q*q), taking care to avoid unnecessary overflow and underflow.
Ilogb returns the binary exponent of x as an integer.
Inf returns positive infinity if sign >= 0, negative infinity if sign < 0.
IsInf reports whether f is an infinity, according to sign.
IsNaN reports whether f is a "not-a-number" value.
J0 returns the order-zero Bessel function of the first kind.
J1 returns the order-one Bessel function of the first kind.
Jn returns the order-n Bessel function of the first kind.
Ldexp is the inverse of Frexp.
Lgamma returns the natural logarithm and sign (-1 or +1) of Gamma(x).
Log returns the natural logarithm of x.
Log10 returns the decimal logarithm of x.
Log1p returns the natural logarithm of 1 plus its argument x.
Log2 returns the binary logarithm of x.
Logb returns the binary exponent of x.
Max returns the larger of x or y.
MaxValue returns the maximum value for the type.
Min returns the smaller of x or y.
MinValue returns the minimum value for the type.
Mod returns the floating-point remainder of x/y.
Modf returns integer and fractional floating-point numbers that sum to f.
NaN returns the "not-a-number" value.
Nextafter returns the next representable float32 value after x towards y.
Pow returns x**y, the base-x exponential of y.
Pow10 returns 10**n, the base-10 exponential of n.
Remainder returns the IEEE 754 floating-point remainder of x/y.
Round returns the nearest integer, rounding half away from zero.
RoundToEven returns the nearest integer, rounding ties to even.
Signbit reports whether x is negative or negative zero.
Sin returns the sine of the radian argument x.
Sincos returns Sin(x), Cos(x).
Sinh returns the hyperbolic sine of x.
SmallestPositiveNonZeroValue returns the smallest, positive, non-zero value for the type.
Sqrt returns the square root of x.
Tan returns the tangent of the radian argument x.
Tanh returns the hyperbolic tangent of x.
Trunc returns the integer value of x.
Y0 returns the order-zero Bessel function of the second kind.
Y1 returns the order-one Bessel function of the second kind.
Yn returns the order-n Bessel function of the second kind.
# Constants
DegreesToRadians converts a value in degrees to radians when multiplied with the value.
Mathematical constants.
Mathematical constants.
Mathematical constants.
Mathematical constants.
Mathematical constants.
Floating-point limit values.
Floating-point limit values.
Integer limit values.
Integer limit values.
Integer limit values.
Integer limit values.
Integer limit values.
Integer limit values.
Integer limit values.
Integer limit values.
Integer limit values.
Integer limit values.
Integer limit values.
Integer limit values.
Integer limit values.
Integer limit values.
Integer limit values.
Mathematical constants.
Mathematical constants.
RadiansToDegrees converts a value in radians to degrees when multiplied with the value.
Floating-point limit values.
Floating-point limit values.
Mathematical constants.
Mathematical constants.
Mathematical constants.
Mathematical constants.
# Interfaces
Numeric is a constraint that permits any integer or float type.