Ceil in Go

Posted by GoDoc
Public (Editable by Users)

Ceil returns the least integer value greater than or equal to x.

Go
Edit
package main

import (
	"fmt"
	"math"
)

func main() {
	c := math.Ceil(1.49)
	fmt.Printf("%.1f", c)
}