floatx

package
v1.9.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 21, 2021 License: BSD-2-Clause Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Format32

func Format32(value float32, decimals int) string

Format32 convert float32 to string, with decimals numbers.

func Format64

func Format64(value float64, decimals int) string

Format64 convert float64 to string, with decimals numbers.

func Max32

func Max32(value1, value2 float32) float32

Max32 return the larger one of float values

func Max64

func Max64(value1, value2 float64) float64

Max64 returns the larger one of float64 values

func Min32

func Min32(value1, value2 float32) float32

Min32 return the smaller one of float values

func Min64

func Min64(value1, value2 float64) float64

Min64 returns the smaller one of float64 values

func Parse32

func Parse32(str string) (float32, error)

Parse32 convert str to float32.

func Parse64

func Parse64(str string) (float64, error)

Parse64 convert str to float64.

func SafeParse32

func SafeParse32(str string, defaultValue float32) float32

SafeParse32 convert str to float32. if str is not a illegal uint value representation, return defaultValue

func SafeParse64

func SafeParse64(str string, defaultValue float64) float64

SafeParse64 convert str to float64. if str is not a illegal uint value representation, return defaultValue

func SimpleFormat32

func SimpleFormat32(value float32) string

SimpleFormat32 convert float32 to string

func SimpleFormat64

func SimpleFormat64(value float64) string

SimpleFormat64 convert float64 to string

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL