Standard library / math

math.Sincos()

Computes sine and cosine of one radian angle together. Expected stdout: '0 1\n'.

Formal Syntax & Structure

go syntaxgo
func Sincos(x float64) (sin, cos float64)

Parameters & Attributes

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

Return Value

(sin, cos float64)

Computes sine and cosine of one radian angle together.

Working Example

Example Snippetgo
package main
import (  "fmt"  "math")
func main() {  s, c := math.Sincos(0)  fmt.Println(s, c)}
Go Reference