MathF MathF MathF MathF Class

定义

为三角函数、对数函数和其他通用数学函数提供常数和静态方法。Provides constants and static methods for trigonometric, logarithmic, and other common mathematical functions.

public ref class MathF abstract sealed
public static class MathF
type MathF = class
Public Class MathF
继承
MathFMathFMathFMathF

注解

MathF类的静态字段和方法对应于Math类的静态字段和方法, 不同之处在于它们的参数Single Double是类型Double而不是类型Single , 而是返回值而非值。The static fields and methods of the MathF class correspond to those of the Math class, except that their parameters are of type Single rather than Double, and they return Single rather than Double values.

字段

E E E E

表示自然对数的底,它由常数 e 指定。Represents the natural logarithmic base, specified by the constant, e.

PI PI PI PI

表示圆的周长与其直径的比值,由常数 π 指定。Represents the ratio of the circumference of a circle to its diameter, specified by the constant, π.

方法

Abs(Single) Abs(Single) Abs(Single) Abs(Single)

返回单精度浮点数字的绝对值。Returns the absolute value of a single-precision floating-point number.

Acos(Single) Acos(Single) Acos(Single) Acos(Single)

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

Acosh(Single) Acosh(Single) Acosh(Single) Acosh(Single)

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

Asin(Single) Asin(Single) Asin(Single) Asin(Single)

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

Asinh(Single) Asinh(Single) Asinh(Single) Asinh(Single)

返回双曲正弦值为指定数字的角度。Returns the angle whose hyperbolic sine is the specified number.

Atan(Single) Atan(Single) Atan(Single) Atan(Single)

返回正切值为指定数字的角度。Returns the angle whose tangent is the specified number.

Atan2(Single, Single) Atan2(Single, Single) Atan2(Single, Single) Atan2(Single, Single)

返回正切值为两个指定数字的商的角度。Returns the angle whose tangent is the quotient of two specified numbers.

Atanh(Single) Atanh(Single) Atanh(Single) Atanh(Single)

返回双曲正切值为指定数字的角度。Returns the angle whose hyperbolic tangent is the specified number.

BitDecrement(Single) BitDecrement(Single) BitDecrement(Single) BitDecrement(Single)

返回小于 x 的下一个最小值。Returns the next smallest value that compares less than x.

BitIncrement(Single) BitIncrement(Single) BitIncrement(Single) BitIncrement(Single)

返回大于 x 的下一个最大值。Returns the next largest value that is greater than x.

Cbrt(Single) Cbrt(Single) Cbrt(Single) Cbrt(Single)

返回指定数字的立方根。Returns the cube root of a specified number.

Ceiling(Single) Ceiling(Single) Ceiling(Single) Ceiling(Single)

返回大于等于指定的单精度浮点数的最小整数值。Returns the smallest integral value that is greater than or equal to the specified single-precision floating-point number.

CopySign(Single, Single) CopySign(Single, Single) CopySign(Single, Single) CopySign(Single, Single)

返回一个值,它具有 x 的大小和 y 的符号。Returns a value with the magnitude of x and the sign of y.

Cos(Single) Cos(Single) Cos(Single) Cos(Single)

返回指定角度的余弦值。Returns the cosine of the specified angle.

Cosh(Single) Cosh(Single) Cosh(Single) Cosh(Single)

返回指定角度的双曲余弦值。Returns the hyperbolic cosine of the specified angle.

Exp(Single) Exp(Single) Exp(Single) Exp(Single)

返回 e 的指定次幂。Returns e raised to the specified power.

Floor(Single) Floor(Single) Floor(Single) Floor(Single)

返回小于等于指定单精度浮点数的最大整数值。Returns the largest integral value less than or equal to the specified single-precision floating-point number.

FusedMultiplyAdd(Single, Single, Single) FusedMultiplyAdd(Single, Single, Single) FusedMultiplyAdd(Single, Single, Single) FusedMultiplyAdd(Single, Single, Single)

返回 (x * y) + z,舍入为一个三元运算。Returns (x * y) + z, rounded as one ternary operation.

IEEERemainder(Single, Single) IEEERemainder(Single, Single) IEEERemainder(Single, Single) IEEERemainder(Single, Single)

返回一指定数字被另一指定数字相除的余数。Returns the remainder resulting from the division of a specified number by another specified number.

ILogB(Single) ILogB(Single) ILogB(Single) ILogB(Single)

返回指定数字以 2 为底的整数对数。Returns the base 2 integer logarithm of a specified number.

Log(Single, Single) Log(Single, Single) Log(Single, Single) Log(Single, Single)

返回指定数字在使用指定底时的对数。Returns the logarithm of a specified number in a specified base.

Log(Single) Log(Single) Log(Single) Log(Single)

返回指定数字的自然对数(底为 e)。Returns the natural (base e) logarithm of a specified number.

Log10(Single) Log10(Single) Log10(Single) Log10(Single)

返回指定数字以 10 为底的对数。Returns the base 10 logarithm of a specified number.

Log2(Single) Log2(Single) Log2(Single) Log2(Single)

返回指定数字以 2 为底的对数。Returns the base 2 logarithm of a specified number.

Max(Single, Single) Max(Single, Single) Max(Single, Single) Max(Single, Single)

返回两个单精度浮点数字中较大的一个。Returns the larger of two single-precision floating-point numbers.

MaxMagnitude(Single, Single) MaxMagnitude(Single, Single) MaxMagnitude(Single, Single) MaxMagnitude(Single, Single)

返回两个单精度浮点数字中的较大值。Returns the larger magnitude of two single-precision floating-point numbers.

Min(Single, Single) Min(Single, Single) Min(Single, Single) Min(Single, Single)

返回两个单精度浮点数字中较小的一个。Returns the smaller of two single-precision floating-point numbers.

MinMagnitude(Single, Single) MinMagnitude(Single, Single) MinMagnitude(Single, Single) MinMagnitude(Single, Single)

返回两个单精度浮点数字中的较小值。Returns the smaller magnitude of two single-precision floating-point numbers.

Pow(Single, Single) Pow(Single, Single) Pow(Single, Single) Pow(Single, Single)

返回指定数字的指定次幂。Returns a specified number raised to the specified power.

Round(Single, Int32, MidpointRounding) Round(Single, Int32, MidpointRounding) Round(Single, Int32, MidpointRounding) Round(Single, Int32, MidpointRounding)

将单精度浮点值舍入到指定的小数位数,并为中点值使用指定的舍入规则。Rounds a single-precision floating-point value to a specified number of fractional digits, and uses the specified rounding convention for midpoint values.

Round(Single, MidpointRounding) Round(Single, MidpointRounding) Round(Single, MidpointRounding) Round(Single, MidpointRounding)

将单精度浮点值舍入到最接近的整数,并为中点值使用指定的舍入规则。Rounds a single-precision floating-point value to the nearest integer, and uses the specified rounding convention for midpoint values.

Round(Single, Int32) Round(Single, Int32) Round(Single, Int32) Round(Single, Int32)

将单精度浮点值舍入到指定的小数位数,并将中点值舍入到最接近的偶数。Rounds a single-precision floating-point value to a specified number of fractional digits, and rounds midpoint values to the nearest even number.

Round(Single) Round(Single) Round(Single) Round(Single)

将单精度浮点值舍入到最接近的整数值,并将中点值舍入到最接近的偶数。Rounds a single-precision floating-point value to the nearest integral value, and rounds midpoint values to the nearest even number.

ScaleB(Single, Int32) ScaleB(Single, Int32) ScaleB(Single, Int32) ScaleB(Single, Int32)

返回有效计算的 x * 2^n。Returns x * 2^n computed efficiently.

Sign(Single) Sign(Single) Sign(Single) Sign(Single)

返回一个整数,该整数表示单精度浮点数字的符号。Returns an integer that indicates the sign of a single-precision floating-point number.

Sin(Single) Sin(Single) Sin(Single) Sin(Single)

返回指定角度的正弦值。Returns the sine of the specified angle.

Sinh(Single) Sinh(Single) Sinh(Single) Sinh(Single)

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

Sqrt(Single) Sqrt(Single) Sqrt(Single) Sqrt(Single)

返回指定数字的平方根。Returns the square root of a specified number.

Tan(Single) Tan(Single) Tan(Single) Tan(Single)

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

Tanh(Single) Tanh(Single) Tanh(Single) Tanh(Single)

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

Truncate(Single) Truncate(Single) Truncate(Single) Truncate(Single)

计算指定单精度浮点数的整数部分。Calculates the integral part of a specified single-precision floating-point number.

适用于