moremath

package
v2.0.0-...-4b7107c Latest Latest
Warning

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

Go to latest
Published: Jul 5, 2023 License: MIT Imports: 1 Imported by: 0

README

More Math Tools

Description

This package provides math stuff golang doesn't seem to have.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CompareFloat32WithPrecision

func CompareFloat32WithPrecision(a, b float32, numberDecimalPlaces int) (result bool)

CompareFloat32WithPrecision compares two floats precisely up to a specified number of decimal places.

func CompareFloat64WithPrecision

func CompareFloat64WithPrecision(a, b float64, numberDecimalPlaces int) (result bool)

CompareFloat64WithPrecision compares two floats precisely up to a specified number of decimal places.

func RoundFloat32

func RoundFloat32(value float32, position int) float32

RoundFloat32 - round a float to a given decimal position

func RoundFloat64

func RoundFloat64(value float64, position int) float64

RoundFloat64 - round a float to a given decimal position

func TruncFloat32

func TruncFloat32(value float32, position int) float32

TruncFloat32 - truncate a float to a given position

func TruncFloat64

func TruncFloat64(value float64, position int) float64

TruncFloat64 - truncate a float to a given position

Types

This section is empty.

Jump to

Keyboard shortcuts

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