util

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jan 1, 2019 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Clamp

func Clamp(min, max, v float64) float64

Clamp force v to be between min and max.

func IntAbs

func IntAbs(x int) int

IntAbs returns the absolute value of x.

func Parallel

func Parallel(width, height int, f func(x1, y1, x2, y2 int)) chan struct{}

Parallel runs f in runtime.NumCPU() parallel tiles.

func ParallelR

func ParallelR(r image.Rectangle, f func(x1, y1, x2, y2 int)) chan struct{}

ParallelR runs Parallel with the given r boundaries.

Types

This section is empty.

Jump to

Keyboard shortcuts

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