Cos in Go

Posted by GoDoc
Public (Editable by Users)

Cos returns the cosine of the radian argument x.

Go
Edit
package main

import (
	"fmt"
	"math"
)

func main() {
	fmt.Printf("%.2f", math.Cos(math.Pi/2))
}