package zfloat
import "zgo.at/zstd/zfloat"
Package zfloat implements functions for floats.
Index ¶
- func IsSignedZero(f float64) bool
- func Join(nums []float64, sep string) string
- func Limit(v, lower, upper float64) float64
- func RoundTo(f float64, precision int) float64
- func Split(s, sep string) ([]float64, error)
- type Byte
Functions ¶
func IsSignedZero ¶
IsSignedZero checks if this number is a signed zero (i.e. -0, instead of +0).
func Join ¶
Join a float with the given separator.
func Limit ¶
Limit a value between a lower and upper limit.
func RoundTo ¶
RoundTo rounds the value to the given precision.
e.g. RoundTo(7.258, 2) will return 7.26
func Split ¶
Split converts a string of numbers to a []float64.
Types ¶
type Byte ¶
type Byte float64
Byte is a float64 where the String() method prints out a human-redable description.
func (Byte) String ¶
Source Files ¶
zfloat.go
- Version
- v0.0.0-20240930202209-a63c3335042a (latest)
- Published
- Sep 30, 2024
- Platform
- linux/amd64
- Imports
- 4 packages
- Last checked
- 2 days ago –
Tools for package owners.