Skip to content

Instantly share code, notes, and snippets.

@benevolent0505
Created September 21, 2012 16:45
Show Gist options
  • Save benevolent0505/3762564 to your computer and use it in GitHub Desktop.
Save benevolent0505/3762564 to your computer and use it in GitHub Desktop.
「A Tour of Go」でGo言語を学ぶ(~#10) ref: http://qiita.com/items/a5b514b289997b50a8bb
-1 1.2246467991473515e-16
func parameter(radius,angle float64) (float64,float64) {
x := radius * math.Cos(angle)
y := radius * math.Sin(angle)
return x,y
}
package main
import (
"fmt"
"math"
)
func parameter(radius,angle float64) (x,y float64) {
x = radius * math.Cos(angle)
y = radius * math.Sin(angle)
return
}
func main() {
fmt.Println(parameter(1.0,math.Pi))
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment