Documentation ¶
Overview ¶
Package floatrange holds distributions that accept and return float64s
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Constant ¶
type Constant float64
Constant is a range that represents some constant float
func (Constant) EnforceRange ¶
EnforceRange returns the float behind the constant
func (Constant) Percentile ¶
Percentile returns the float behind the constant
type Infinite ¶
type Infinite struct{}
Infinite is an immutable range that will always return math.MaxFloat64
func (Infinite) EnforceRange ¶
EnforceRange returns math.MaxFloat64
func (Infinite) Percentile ¶
Percentile returns the float behind the constant
type Linear ¶
type Linear struct {
Max, Min float64
// contains filtered or unexported fields
}
Linear is a range from min to max
func (Linear) EnforceRange ¶
EnforceRange returns f, if InRange(f), or the closest value in the range to f.
func (Linear) Percentile ¶
Percentile returns the fth percentile value along this range
Click to show internal directories.
Click to hide internal directories.