math

package
v0.0.0-...-84a1979 Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2020 License: GPL-3.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

View Source
const (
	//NONE is returned from a math function with no solution
	NONE uint8 = 0
	//ONE  is returned from a math function with one solution
	ONE uint8 = 1
	//INFINITE is returned from a math function with infinte solutions
	INFINITE uint8 = 2
)

Variables

This section is empty.

Functions

func Cross

func Cross(first *Linear, second *Linear) (float64, uint8)

Cross checks if the two linear functions cross at some point

Types

type Linear

type Linear struct {
	M, C float64
}

Linear is a linear function

func (*Linear) Y

func (linear *Linear) Y(x float64) float64

Y calculates the value y of a linear function

Jump to

Keyboard shortcuts

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