utils

package
v0.0.0-...-c1f540c Latest Latest
Warning

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

Go to latest
Published: May 30, 2024 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PRIME   = 1610612741
	BITS    = 30
	MASK    = (1 << BITS) - 1
	SCALING = 1.0 / float64(1<<BITS)
)

Variables

This section is empty.

Functions

func ExtensionFromMime

func ExtensionFromMime(mime string) string

func Interpolate

func Interpolate(start, end, position float64) float64

func InterpolateExponential

func InterpolateExponential(start, end, position float64) float64

func InterpolateRect

func InterpolateRect(bottomleft, bottomright, topleft, topright, x, y float64) float64

func RoundUpDiv

func RoundUpDiv(dividend, divisor int) int

func SquareFloat64

func SquareFloat64(x float64) float64

func SquareInt

func SquareInt(x int) int

Types

type OrientationRandom

type OrientationRandom struct {
	// contains filtered or unexported fields
}

func NewOrientationRandom

func NewOrientationRandom() *OrientationRandom

func (*OrientationRandom) Float64

func (or *OrientationRandom) Float64() float64

Jump to

Keyboard shortcuts

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