Skip to content

Instantly share code, notes, and snippets.

View jbsmith7741's full-sized avatar

Joshua Smith jbsmith7741

View GitHub Profile
jbsmith7741 / trunc.go
Created July 2, 2020 19:57
truncate float
func trunc(val float64, digit int) float64 {
pow := math.Pow(10.0, float64(digit))
return math.Floor(pow*val) / pow
jbsmith7741 /
Created June 27, 2018 17:41

Keybase proof

I hereby claim:

  • I am jbsmith7741 on github.
  • I am jbsmith7741 ( on keybase.
  • I have a public key ASCY4keAUL6pZYnLAXWp1IX4WJ0U8ycQZBvIsIQZ-hPX8go

To claim this, I am signing this object: