rng

package
v0.17.0 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2023 License: GPL-3.0 Imports: 2 Imported by: 0

README

Range

Methods to work with ranges of floating point numbers.

Documentation

Index

Constants

View Source
const (
	ErrStartIsReversed = "start is reversed"
)

Variables

This section is empty.

Functions

func IsSequence

func IsSequence(r1 *Range, r2 *Range) (isSequence bool)

Types

type Range

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

func New

func New(start float64, end float64) (r *Range, err error)

func (*Range) Contains

func (r *Range) Contains(value float64) (contains bool)

func (*Range) GetEnd

func (r *Range) GetEnd() (mid float64)

func (*Range) GetMiddle

func (r *Range) GetMiddle() (mid float64)

func (*Range) GetRadius

func (r *Range) GetRadius() (rad float64)

func (*Range) GetStart

func (r *Range) GetStart() (mid float64)

func (*Range) HasIntersectionWith

func (r *Range) HasIntersectionWith(that *Range) (intersects bool)

Jump to

Keyboard shortcuts

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