utils

package
v0.0.0-...-c293384 Latest Latest
Warning

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

Go to latest
Published: Jan 4, 2020 License: GPL-3.0 Imports: 6 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AT

func AT(x, a, b, c, d float64) float64

AT x (in the range [a, b] to a number in [c, d]

func Equals

func Equals(a, b float64) bool

Equals is used to compare floating point numbers

func Homedir

func Homedir() string

Homedir returns the home directory of the user

func IsPowerOf2

func IsPowerOf2(i int) bool

IsPowerOf2 returns true if i is a power of 2

func Random

func Random(min, max int) int

Random returns a random int in [min, max)

func RandomDefaultFloat

func RandomDefaultFloat(min, max float64) float64

RandomDefaultFloat returns a random float in [min, max)

func RandomFloat

func RandomFloat(r *rand.Rand, min, max float64) float64

RandomFloat returns a random float in [min, max)

Types

This section is empty.

Jump to

Keyboard shortcuts

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