Floor returns the greatest integer value less than or equal to x.
package main import ( "fmt" "math" ) func main() { c := math.Floor(1.51) fmt.Printf("%.1f", c) }