calc

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Oct 4, 2025 License: Unlicense Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Limit

func Limit(x float64, r Range) float64

Limit limits x to fix into Range

func Percentage

func Percentage(x float64, r Range) float64

Percentage returns x's position within Range in percent

func Transpose

func Transpose(x float64, from, to Range) float64

Transppose projects x from one range to another maintaining equal proportions

Types

type Range

type Range struct {
	Min, Max float64
}

Jump to

Keyboard shortcuts

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