math

package
v0.0.0-...-5a547ea Latest Latest
Warning

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

Go to latest
Published: Jul 12, 2018 License: MIT Imports: 2 Imported by: 2

README

float.go

Some useful functions order to resolve float64 precision problems

  • Round
  • Round to int64
  • Sum, Sub, Mul and Div

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FloatDiv

func FloatDiv(x, y float64) float64

func FloatDivRound

func FloatDivRound(x, y float64, places int, zs ...float64) float64

func FloatMul

func FloatMul(x, y float64) float64

func FloatMulRound

func FloatMulRound(x, y float64, places int, zs ...float64) float64

func FloatRound

func FloatRound(value float64, places int) float64

func FloatRoundToInt

func FloatRoundToInt(value float64, places int) int64

func FloatSub

func FloatSub(x, y float64) float64

func FloatSubRound

func FloatSubRound(x, y float64, places int, zs ...float64) float64

func FloatSum

func FloatSum(x, y float64) float64

func FloatSumRound

func FloatSumRound(x, y float64, places int, zs ...float64) float64

func MaxInt

func MaxInt(x, y int) int

Max returns the larger of x or y.

func MaxInt64

func MaxInt64(x, y int64) int64

Max returns the larger of x or y.

func MinInt

func MinInt(x, y int) int

Min returns the smaller of x or y.

func MinInt64

func MinInt64(x, y int64) int64

Min returns the smaller of x or y.

Types

This section is empty.

Jump to

Keyboard shortcuts

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