Skip to content

Instantly share code, notes, and snippets.

View pelegm's full-sized avatar

Peleg Michaeli pelegm

View GitHub Profile
@pelegm
pelegm / round.go
Last active January 5, 2018 13:48 — forked from DavidVaini/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))