mathi: github.com/m7shapan/mathi Index | Files

package mathi

import "github.com/m7shapan/mathi"

Index

Package Files

helpers.go math.go round.go

func Abs Uses

func Abs(x int64) int64

Abs returns the absolute value of int64 x.

func Ceil Uses

func Ceil(x float64) int64

Ceil returns the least integer value greater than or equal to x.

func Copysign Uses

func Copysign(x, y int64) int64

Copysign returns a value with the magnitude of x and the sign of y.

func Dim Uses

func Dim(x, y int64) int64

Dim returns the maximum of x-y or 0.

func Floor Uses

func Floor(x float64) int64

Floor returns the greatest integer value less than or equal to x.

func Max Uses

func Max(x, y int64) int64

Max returns the larger of x or y.

func Min Uses

func Min(x, y int64) int64

Min returns the smaller of x or y.

func Pow Uses

func Pow(x, y int64) int64

Pow returns x**y, the base-x exponential of y.

func Pow10 Uses

func Pow10(n int) int64

Pow10 returns 10**n, the base-10 exponential of n.

func Round Uses

func Round(x float64) int64

Round returns the nearest integer, rounding half away from zero.

func RoundN Uses

func RoundN(x float64, y int) float64

RoundN returns the nearest float64, rounding half away from zero with n number of digits.

func RoundToEven Uses

func RoundToEven(x float64) int64

RoundToEven returns the nearest integer, rounding ties to even.

Package mathi imports 1 packages (graph). Updated 2020-04-19. Refresh now. Tools for package owners.