zfloat

package
v0.0.0-...-8c08148 Latest Latest
Warning

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

Go to latest
Published: May 23, 2026 License: MIT Imports: 4 Imported by: 2

Documentation

Overview

Package zfloat implements functions for floats.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsSignedZero

func IsSignedZero(f float64) bool

IsSignedZero checks if this number is a signed zero (i.e. -0, instead of +0).

func Join

func Join(nums []float64, sep string) string

Join a float with the given separator.

func Limit

func Limit(v, lower, upper float64) float64

Limit a value between a lower and upper limit.

func RoundTo

func RoundTo(f float64, precision int) float64

RoundTo rounds the value to the given precision.

e.g. RoundTo(7.258, 2) will return 7.26

func Split

func Split(s, sep string) ([]float64, error)

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

func (b Byte) String() string

Jump to

Keyboard shortcuts

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