xyosc/vendor/github.com/chewxy/math32/acos.go
2024-12-21 17:38:26 +01:00

10 lines
180 B
Go

package math32
// Acos returns the arccosine, in radians, of x.
//
// Special case is:
// Acos(x) = NaN if x < -1 or x > 1
func Acos(x float32) float32 {
return Pi/2 - Asin(x)
}