MathF.Acos(Single) 方法

定义

返回余弦值为指定数字的角度。Returns the angle whose cosine is the specified number.

public:
 static float Acos(float x);
public static float Acos (float x);
static member Acos : single -> single
Public Shared Function Acos (x As Single) As Single

参数

x
Single

一个表示余弦值的数字,其中 x 必须大于或等于 -1 但小于或等于 1。A number representing a cosine, where x must be greater than or equal to -1, but less than or equal to 1.

返回

角度 θ,以弧度为单位,满足 0 ≤ θ ≤ π。An angle, θ, measured in radians, such that 0 ≤ θ ≤ π.

- 或 --or- 如果 x < -1 或 x > 1 或 x 等于 NaN,则为 NaNNaN if x < -1 or x > 1 or x equals NaN.

注解

将返回值乘以 180/MathF.PI , 以将弧度转换为度。Multiply the return value by 180/MathF.PI to convert from radians to degrees.

适用于