Documentation ¶
Overview ¶
package floats provides a standard Floater interface and all the std math functions
defined on Floater types. Furthermore, fully generic slice sort and conversion methods in the kit type kit package attempt to use this interface, before falling back on reflection. If you have a struct that can be converted into an float64, then this is the only way to allow it to be sorted using those generic functions, as the reflect.Kind fallback will fail.
Index ¶
- func Abs(x Floater) float64
- func Acos(x Floater) float64
- func Acosh(x Floater) float64
- func Asin(x Floater) float64
- func Asinh(x Floater) float64
- func Atan(x Floater) float64
- func Atan2(y, x Floater) float64
- func Atanh(x Floater) float64
- func Cbrt(x Floater) float64
- func Ceil(x Floater) float64
- func Copysign(x, y Floater) float64
- func Cos(x Floater) float64
- func Cosh(x Floater) float64
- func Dim(x, y Floater) float64
- func Erf(x Floater) float64
- func Erfc(x Floater) float64
- func Erfcinv(x Floater) float64
- func Erfinv(x Floater) float64
- func Exp(x Floater) float64
- func Exp2(x Floater) float64
- func Expm1(x Floater) float64
- func Floor(x Floater) float64
- func Frexp(f Floater) (frac float64, exp int)
- func Gamma(x Floater) float64
- func Hypot(p, q Floater) float64
- func Ilogb(x Floater) int
- func IsInf(f Floater, sign int) bool
- func IsNaN(f Floater) (is bool)
- func J0(x Floater) float64
- func J1(x Floater) float64
- func Jn(n int, x Floater) float64
- func Ldexp(frac Floater, exp int) float64
- func Lgamma(x Floater) (lgamma float64, sign int)
- func Log(x Floater) float64
- func Log10(x Floater) float64
- func Log1p(x Floater) float64
- func Log2(x Floater) float64
- func Logb(x Floater) float64
- func Max(x, y Floater) float64
- func Min(x, y Floater) float64
- func Mod(x, y Floater) float64
- func Modf(f Floater) (int float64, frac float64)
- func Nextafter(x, y Floater) (r float64)
- func Pow(x, y Floater) float64
- func Remainder(x, y Floater) float64
- func Round(x Floater) float64
- func RoundToEven(x Floater) float64
- func Signbit(x Floater) bool
- func Sin(x Floater) float64
- func Sincos(x Floater) (sin, cos float64)
- func Sinh(x Floater) float64
- func Sqrt(x Floater) float64
- func Tan(x Floater) float64
- func Tanh(x Floater) float64
- func Trunc(x Floater) float64
- func Y0(x Floater) float64
- func Y1(x Floater) float64
- func Yn(n int, x Floater) float64
- type FloatSetter
- type Floater
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RoundToEven ¶
Types ¶
type FloatSetter ¶
FloatSetter is Floater that also supports setting the value from a float64. Satisfying this interface requires a pointer to the underlying type.
Click to show internal directories.
Click to hide internal directories.