Skip to content

Instantly share code, notes, and snippets.

Dmitry Udod dmitry-udod

Block or report user

Report or block dmitry-udod

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@DavidVaini
DavidVaini / round.go
Created Apr 9, 2014
Arggh Golang does not include a round function in the standard math package. So I wrote a quick one.
View round.go
package main
import (
"log"
"math"
)
func Round(val float64, roundOn float64, places int ) (newVal float64) {
var round float64
pow := math.Pow(10, float64(places))
You can’t perform that action at this time.