Math
Written by: maffelu , 2009-04-16 17:54:06
| Method | Returns |
|---|---|
| Abs | Returns the absolute value of a number. |
| Ceiling | Returns a value that is the smallest whole number greater than or equal to a given number. |
| Exp | Returns E raised to a given power. This is the inverse of Log. |
| Floor | Returns a value that is the largest whole number that is less than or equal to the given number. |
| IEEERemainder | Returns the result of a division of two specified numbers. (This division operation conforms to the remainder operation stated within Section 5.1 of ANSI/IEEE Std. 754-1985; IEEE Standard for Binary Floating-Point Arithmetic; Institute of Electrical and Electronics Engineers, Inc; 1985.) |
| Log | Returns a value that is the logarithmic value of the given number. |
| Log10 | Returns a value that is the base 10 logarithm of a given value. |
| Max | Returns the larger of two values. |
| Min | Returns the smaller of two values. |
| Pow | Returns the value of a given value raised to a given power. |
| Round | Returns a rounded value for a number. You can specify the precision of the rounded number. The number .5 would be rounded down. |
| Sign | Returns a value indicating the sign of a value. 1 is returned for a negative number, 0 is returned for zero, and 1 is returned for a positive number. |
| Sqrt | Returns the square root for a given value. |
| Acos | Returns the value of an angle whose cosine is equal to a given number. |
| Asin | Returns the value of an angle whose sine is equal to a given number. |
| Atan | Returns the value of an angle whose tangent is equal to a given number. |
| Atan2 | Returns the value of an angle whose tangent is equal to the quotient of two given numbers. |
| Cos | Returns a value that is the cosine of a given angle. |
| Cosh | Returns a value that is the hyperbolic cosine for a given angle. |
| Sin | Returns the sine for a given angle. |
| Sinh | Returns the hyperbolic sine for a given angle. |
| Tan | Returns the tangent of a specified angle. |
| Tanh | Returns the hyperbolic tangent of a given angle. |
Console.WriteLine("1. The square root of {0} is {1}.", 9, Math.Sqrt(9));
Console.WriteLine("2. The ceiling of {0} is {1}.", 9.4, Math.Ceiling(9.4));
Console.WriteLine("3. {0} raised to {1} is {2}.", 9.5, 3, Math.Pow(9.5,3));
Console.WriteLine("4. {0} rounded is {1}.", 10.7, Math.Round(10.7));
Console.Read();
There are no comments on this article.
If you have any question or just want to leave a message, just fill out the form below!
Your e-mail will not be visible in your post, it is for validation reasons only
Maffelu
Creator and admin of MorkaLork.com.
Started programming in HTML back when frames and tables was the way to design a page, moved on to Pascal/Delphi, PHP, javascript/jQuery, VB.NET/C#, Java and C++.
Currently studies .NET (in general) focusing on ASP.NET.