Documentation
¶
Index ¶
- func Apply[T Numeric](value T, scale, offset float64) float64
- func ApplyAny(value any, scale, offset float64) any
- func ApplySlice[S []E, E Numeric](values S, scale, offset float64) []float64
- func Discard(value, scale, offset float64) float64
- func DiscardAny(value any, baseType basetype.BaseType, scale, offset float64) any
- func DiscardSlice[E Numeric](values []float64, scale, offset float64) []E
- type Numeric
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ApplyAny ¶
ApplyAny applies scale and offset when possible, otherwise return original value. This function can only accept primitive-types value such as int8, []int8, uint32, []uint32, etc.
func ApplySlice ¶
Apply applies scale and offset on slice values.
func DiscardAny ¶
DiscardAny restores scaled value in the form of float64 or []float64 to its basetype's form.
func DiscardSlice ¶
DiscardSlice discards applied scale and offset on slice values.
Types ¶
type Numeric ¶
type Numeric interface { constraints.Integer | constraints.Float }
Click to show internal directories.
Click to hide internal directories.