' Calculate the secant of angle, in radians. Public Function Sec(angle As Double) As Double This example uses the Cos method of the Math class to return the cosine of an angle. You can use it rather than calculating it. The System.Math class contains Math.PI constant field. This example uses the Atan method of the Math class to calculate the value of pi. ' This example produces the following output: This example uses the Abs method of the Math class to compute the absolute value of a number. To use these functions without qualification, import the System.Math namespace into your project by adding the following code to the top of your source file: Imports System.Math Returns the smaller magnitude of two double-precision floating-point numbers. Returns the larger magnitude of two double-precision floating-point numbers. Returns the base 2 logarithm of a specified number. Returns the base 2 integer logarithm of a specified number. Returns (x * y) + z, rounded as one ternary operation. Returns a value with the magnitude of x and the sign of y. Returns value clamped to the inclusive range of min and max. Returns the cube root of a specified number. Returns the next largest value that compares greater than x. Returns the next smallest value that compares less than x. Returns the angle whose hyperbolic tangent is the specified number. Returns the angle whose hyperbolic sine is the specified number. Returns the angle whose hyperbolic cosine is the specified number. The following table lists methods of the System.Math class that don't exist in. Returns the hyperbolic tangent of the specified angle.Ĭalculates the integral part of a specified Decimal or Double number. Returns the tangent of the specified angle. Returns the square root of a specified number. Returns the hyperbolic sine of the specified angle. Returns an Integer value indicating the sign of a number. Returns a Decimal or Double value rounded to the nearest integral value or to a specified number of fractional digits. Returns a specified number raised to the specified power. Returns the base 10 logarithm of a specified number. Returns the natural (base e) logarithm of a specified number or the logarithm of a specified number in a specified base. Returns the remainder that results from the division of a specified number by another specified number. Returns the largest integer that's less than or equal to the specified Decimal or Double number. Returns e (the base of natural logarithms) raised to the specified power. Returns the quotient of two 32-bit or 64-bit signed integers, and also returns the remainder in an output parameter. Returns the hyperbolic cosine of the specified angle. Returns the cosine of the specified angle. Returns the smallest integral value that's greater than or equal to the specified Decimal or Double. Returns the full product of two 32-bit numbers. Returns the angle whose tangent is the quotient of two specified numbers. Returns the angle whose tangent is the specified number. Returns the angle whose sine is the specified number. Returns the angle whose cosine is the specified number. You can use these in a Visual Basic program. The following table lists methods of the System.Math class. The methods of the System.Math class provide trigonometric, logarithmic, and other common mathematical functions.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |