Skip to content

Instantly share code, notes, and snippets.

@yoander
yoander / round.go
Created December 15, 2017 14:33 — forked from pelegm/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))