elmath

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Mar 12, 2021 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Combination

func Combination(n uint, k uint) uint

Combination 組み合わせ Combination(5, 3) == 5C3 == (5*4*3) / (3*2*1) == 10

func Factorial

func Factorial(n uint) uint

Factorial 階乗 5! == 5*4*3*2*1 == 120

func Percent

func Percent(val, total int) float64

Percent returns a values percent of the total

func Permutation

func Permutation(a, b uint) uint

Permutation 順列 Permutation(5, 3) == 5P3 == 5*4*3

func Round

func Round(val float64, precision int) float64

Round half away from zero precision can be a negative number. 四捨五入 四舍五入

Types

This section is empty.

Jump to

Keyboard shortcuts

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