SoFunction
Updated on 2025-03-07

All calculation methods of math class in C# (summary)

As shown below:

Abs Returns the absolute value of the specified number.

Acos Returns the angle at which the cosine value is the specified number.

Asin Returns the angle at which the sine value is the specified number.

Atan Returns the angle at which the tangent value is the specified number.

Atan2 Returns the angle where the tangent value is the quotient of the two specified numbers.

BigMul generates the complete product of two 32-bit numbers.

Ceiling Returns the smallest integer greater than or equal to the specified number.

Cos Returns the cosine value of the specified angle.

Cosh Returns the hyperbolic cosine value of the specified angle.

DivRem calculates the quotient of two numbers and returns the remainder in the output parameter.

Exp Returns the specified power of e.

Floor Returns the maximum integer less than or equal to the specified number.

IEEERemainder Returns the remainder of a specified number divided by another specified number.

Log Returns the logarithm of the specified number.

Log10 Returns the logarithm of the specified number with a base 10.

Max returns the larger of the two specified numbers.

Min returns the smaller of the two numbers.

Pow Returns the specified power of the specified number.

Round Round the value to the nearest integer or specified decimal places.

Sign Returns the value representing the numeric symbol.

Sin Returns the sine value of the specified angle.

Sinh Returns the hyperbolic sine value of the specified angle.

Sqrt Returns the square root of the specified number.

Tan Returns the tangent value of the specified angle.

Tanh Returns the hyperbolic tangent value of the specified angle.

Truncate Computes the integer part of a number.

E represents the base of natural logarithm, which is specified by the constant e.

PI represents the ratio of the circumference of a circle to its diameter, which is specified by the constant n.

The above is the entire content of the math class (summary) that the editor brings to you. I hope it will be helpful to everyone and support me more~