mymath

package
v1.11.35 Latest Latest
Warning

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

Go to latest
Published: Jan 3, 2025 License: BSD-3-Clause Imports: 3 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Float64ByPrecision added in v1.9.2

func Float64ByPrecision(num float64, precision int, roundDown bool) float64

func HBMath added in v1.11.31

func HBMath(totalMoney float64, minAmount float64, num int) (result []float64, err error)

func Max

func Max[T int | int8 | int16 | int32 | int64 | uint | uint8 | uint16 | uint32 | uint64 | float32 | float64](nums ...T) T

func Min

func Min[T int | int8 | int16 | int32 | int64 | uint | uint8 | uint16 | uint32 | uint64 | float32 | float64](nums ...T) T

func Round added in v1.10.2

func Round(x float64, precision int) float64

func Sum

func Sum[T int | int8 | int16 | int32 | int64 | uint | uint8 | uint16 | uint32 | uint64 | float32 | float64](nums ...T) T

Types

This section is empty.

Jump to

Keyboard shortcuts

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