mathutil

package
Version: v4.2.0 Latest Latest
Warning

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

Go to latest
Published: Sep 10, 2021 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Round

func Round(val float64, roundOn float64, places int) (newVal float64)

Round rounds a value val starting at roundOn, and keep places decimal Round(123.555555, .5, 3) -> 123.556 Round(123.558, .5, 2) -> 123.56 Round(123.00001, 0, 0) -> 124

Credits to https://gist.github.com/pelegm/c48cff315cd223f7cf7b

Types

This section is empty.

Source Files

Jump to

Keyboard shortcuts

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