span

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Dec 8, 2021 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Span

type Span struct {
	Min, Max float32
}

Span represents an interval.

func Abs

func Abs(s Span) Span

Abs return the absolute of the given span.

func (Span) Add

func (s0 Span) Add(s1 Span) Span

Add 2 span togheter

[a, b] + [c, d] = [a+c, b+d]

func (Span) Div

func (s0 Span) Div(s1 Span) Span

Div returns s0/s1

func (Span) Mul

func (s0 Span) Mul(s1 Span) Span

Mul multiply this these 2 span togheter

[a, b] * [c, d] = [min(ac, ad, bc, bd), max(ac, ad, bc, bd)]

func (Span) Sub

func (s0 Span) Sub(s1 Span) Span

Sub 2 span togheter

[a, b] - [c, d] = [a-c, b-d]

Jump to

Keyboard shortcuts

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