Standard library / math

math.Sin()

Sine of angle in radians. Expected stdout: '0\n'.

Formal Syntax & Structure

go syntaxgo
func Sin(x float64) float64

Parameters & Attributes

NameTypeDescription
xfloat64First input operand (or sole input if unary).

Return Value

float64

Sine of angle in radians.

Working Example

Example Snippetgo
package main
import (  "fmt"  "math")
func main() {  fmt.Println(math.Sin(0))}
Go Reference