1
0
mirror of https://github.com/golang/go synced 2024-11-23 04:10:04 -07:00

math: the trig functions work in radians; document that

Fixes #6543
6543 is also a fine NGC object.

R=golang-dev, dsymonds, kamil.kisiel, minux.ma
CC=golang-dev
https://golang.org/cl/14515044
This commit is contained in:
Rob Pike 2013-10-07 16:32:47 -07:00
parent e121de2f01
commit 9795882704
4 changed files with 6 additions and 6 deletions

View File

@ -11,7 +11,7 @@ package math
after appropriate range reduction. after appropriate range reduction.
*/ */
// Asin returns the arcsine of x. // Asin returns the arcsine, in radians, of x.
// //
// Special cases are: // Special cases are:
// Asin(±0) = ±0 // Asin(±0) = ±0
@ -44,7 +44,7 @@ func asin(x float64) float64 {
return temp return temp
} }
// Acos returns the arccosine of x. // Acos returns the arccosine, in radians, of x.
// //
// Special case is: // Special case is:
// Acos(x) = NaN if x < -1 or x > 1 // Acos(x) = NaN if x < -1 or x > 1

View File

@ -87,7 +87,7 @@ func satan(x float64) float64 {
return Pi/4 + xatan((x-1)/(x+1)) + 0.5*Morebits return Pi/4 + xatan((x-1)/(x+1)) + 0.5*Morebits
} }
// Atan returns the arctangent of x. // Atan returns the arctangent, in radians, of x.
// //
// Special cases are: // Special cases are:
// Atan(±0) = ±0 // Atan(±0) = ±0

View File

@ -109,7 +109,7 @@ var _cos = [...]float64{
4.16666666666665929218E-2, // 0x3fa555555555554b 4.16666666666665929218E-2, // 0x3fa555555555554b
} }
// Cos returns the cosine of x. // Cos returns the cosine of the radian argument x.
// //
// Special cases are: // Special cases are:
// Cos(±Inf) = NaN // Cos(±Inf) = NaN
@ -165,7 +165,7 @@ func cos(x float64) float64 {
return y return y
} }
// Sin returns the sine of x. // Sin returns the sine of the radian argument x.
// //
// Special cases are: // Special cases are:
// Sin(±0) = ±0 // Sin(±0) = ±0

View File

@ -73,7 +73,7 @@ var _tanQ = [...]float64{
-5.38695755929454629881E7, //0xc189afe03cbe5a31 -5.38695755929454629881E7, //0xc189afe03cbe5a31
} }
// Tan returns the tangent of x. // Tan returns the tangent of the radian argument x.
// //
// Special cases are: // Special cases are:
// Tan(±0) = ±0 // Tan(±0) = ±0