math

package
v0.0.0-...-40008dc Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2022 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package math defines common math operations

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MaxIndexSliceFloat

func MaxIndexSliceFloat(slice []float64) int

MaxIndexSliceFloat returns the index of the maximum value in a []float64.

func MaxInt

func MaxInt(a, b int) int

MaxInt returns the maximum of two intergers.

func MaxSliceFloat

func MaxSliceFloat(slice []float64) float64

MaxSliceFloat calculates the maximum value in a []float64.

func MaxSliceInt

func MaxSliceInt(slice []int) int

MaxSliceInt calculates the maximum value in a []int.

func MinInt

func MinInt(a, b int) int

MinInt returns the minimum of two intergers.

func MinSliceFloat

func MinSliceFloat(slice []float64) float64

MinSliceFloat calculates the minimum value in a []float64.

func MinSliceInt

func MinSliceInt(slice []int) (min int, err error)

MinSliceInt calculates the minimum value in a []int.

func Round

func Round(num, unit float64) (rounded float64)

Round will round to a specificed decimal based on the unit argument.

Types

This section is empty.

Jump to

Keyboard shortcuts

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