Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type PairConverter ¶
type PairConverter struct {
// contains filtered or unexported fields
}
PairConverter makes conversion between two UCUM units.
func NewPairConverter ¶
func NewPairConverter(from, to Unit) (*PairConverter, error)
NewPairConverter creates a new PairConverter.
func (*PairConverter) ConvBigInt ¶
func (*PairConverter) ConvFloat64 ¶
func (c *PairConverter) ConvFloat64(val float64) float64
type Unit ¶
type Unit struct {
// contains filtered or unexported fields
}
Unit is a UCUM unit of measure.
func Normalize ¶
Normalize builds a normalized version of the given unit. Normalized unit consists of a base units only.
func (*Unit) MarshalJSON ¶
MarshalJSON implements the json.Marshaler interface.
func (*Unit) UnmarshalJSON ¶
UnmarshalJSON implements the json.Unmarshaler interface.
Click to show internal directories.
Click to hide internal directories.