MathF.Tanh(Single) 方法

定义

返回指定角度的双曲正切值。Returns the hyperbolic tangent of the specified angle.

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

参数

x
Single

以弧度计量的角度。An angle, measured in radians.

返回

x 的双曲正切值。The hyperbolic tangent of x. 如果 x 等于 NegativeInfinity,则此方法返回 -1。If x is equal to NegativeInfinity, this method returns -1. 如果值等于 PositiveInfinity,则此方法返回 1。If value is equal to PositiveInfinity, this method returns 1. 如果 x 等于 NaN,则此方法返回 NaNIf x is equal to NaN, this method returns NaN.

注解

角度(x)必须以弧度为单位。The angle, x, must be in radians. 乘以 MathF.PI/180 将度转换为弧度。Multiply by MathF.PI/180 to convert degrees to radians.

适用于