Documentation ¶
Index ¶
- Variables
- func CastFloat64[T Real](n T) float64
- func CastReal[N1, N2 Real](n N1) N2
- func ToByte[N Real](n N) byte
- func ToString[S Stringable](s S) string
- func UnsafeBytesToString(bytes []byte) string
- func UnsafeStringToBytes(s string) []byte
- type Number
- type Ordered
- type Real
- type RealSet
- type Realer
- type SliceHeader
- type StringHeader
- type Stringable
Constants ¶
This section is empty.
Variables ¶
var Size = binary.Size
Size returns how many bytes Write would generate to encode the value v, which must be a fixed-size value or a slice of fixed-size values, or a pointer to such data. If v is neither of these, Size returns -1.
Functions ¶
func CastFloat64 ¶
CastFloat64 recasts a Real number to float64. This may not have the effect you intend ...
func CastReal ¶
func CastReal[N1, N2 Real](n N1) N2
CastReal recasts a variable of any type in the constraint Real to a specific instantiated type of Real. This may not have the effect you intend ...
func ToByte ¶
ToByte recasts a variable of any type in the constraint Real to byte. This may not have the effect you intend ...
func ToString ¶
func ToString[S Stringable](s S) string
func UnsafeBytesToString ¶
func UnsafeStringToBytes ¶
Types ¶
type Number ¶
type Number constraints.Number
Number is a constraint that permits any real or complex number type.
type Ordered ¶
type Ordered constraints.Ordered
Ordered is a constraint that permits any ordered type: any type that supports the operators < <= >= >.
type SliceHeader ¶
type StringHeader ¶
type Stringable ¶
type Stringable any