Documentation ¶
Index ¶
- func Format[T constraints.Float](value T, decimals int) string
- func Max[T constraints.Float](value1, value2 T) T
- func Min[T constraints.Float](value1, value2 T) T
- func Parse[T constraints.Float](str string) (T, error)
- func SafeParse[T constraints.Float](str string, defaultValue T) T
- func SimpleFormat[T constraints.Float](value T) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Format ¶
func Format[T constraints.Float](value T, decimals int) string
Format convert float to string, with decimals numbers.
func Max ¶
func Max[T constraints.Float](value1, value2 T) T
Max return the larger one of float values
func Min ¶
func Min[T constraints.Float](value1, value2 T) T
Min return the smaller one of float values
func SafeParse ¶
func SafeParse[T constraints.Float](str string, defaultValue T) T
SafeParse convert str to float. if str is not a illegal uint value representation, return defaultValue
func SimpleFormat ¶
func SimpleFormat[T constraints.Float](value T) string
SimpleFormat convert float to string
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.