mathutil

package
v0.0.0-...-fb1bee7 Latest Latest
Warning

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

Go to latest
Published: Jan 8, 2025 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Angle

func Angle(m Point, n Point) (angel float64)

func GenRandInt

func GenRandInt(min, max int) int

func LeastSquares

func LeastSquares(x []float64, y []float64) (a float64, b float64, err error)

func Max

func Max[T int | uint | int64 | uint64 | float64](data []T) T

func Min

func Min[T int | uint | int64 | uint64 | float64](data []T) T

func Sum

func Sum[T int | uint | int64 | uint64 | float64](data []T) T

func Trunc2

func Trunc2(val float64) float64

Trunc2 trunc2

func Trunc4

func Trunc4(val float64) float64

func TruncN

func TruncN(f float64, n int) float64

Types

type Point

type Point struct {
	X float64 `json:"x"`
	Y float64 `json:"y"`
}

Jump to

Keyboard shortcuts

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