float64y

package
v0.0.18 Latest Latest
Warning

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

Go to latest
Published: Feb 14, 2021 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Abs

func Abs(v float64) float64

Abs returns the absolute value of v.

func Contains

func Contains(vs []float64, v float64) bool

Contains returns true if vs contains v.

func Float64

func Float64(v *float64) float64

Float64 dereferences and returns float64. The float64 default value is returned if v is nil.

func Float64OrDefault

func Float64OrDefault(v *float64, defaultVal float64) *float64

Float64OrDefault returns float64 if it is not nil, and a pointer to defaultVal otherwise.

func Max

func Max(v float64, vs ...float64) float64

Max returns the maximum value from v and vs.

func Min

func Min(v float64, vs ...float64) float64

Min returns the minimum value from v and vs.

func Pointer

func Pointer(v float64) *float64

Pointer returns a pointer to the given float64.

func Random

func Random() float64

Random returns a random value of type float64

func RandomN

func RandomN(n float64) float64

RandomN returns a non-negative pseudo-random number in [0,n) of type float64.

func Unique

func Unique(vs []float64) []float64

Unique returns a new list containing unique float64s from the given input

Types

type Set

type Set map[float64]struct{}

func MakeSet

func MakeSet(vs ...float64) Set

MakeSet returns a lookup map for float64

func ToSet

func ToSet(vs []float64) Set

ToSet returns a lookup map for float64.

func (Set) Contains

func (s Set) Contains(v float64) bool

Contains returns true if Set contains v.

func (Set) Equal

func (s Set) Equal(s2 Set) bool

Equal checks whether all

func (Set) Intersect

func (s Set) Intersect(s2 Set) Set

Intersect returns the intersection of two Sets.

func (Set) Union

func (s Set) Union(s2 Set) Set

Union returns the union of two Sets.

Jump to

Keyboard shortcuts

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