Atlanta Custom Software Development 

 
   Search        Code/Page
 

User Login
Email

Password

 

Forgot the Password?
Services
» Web Development
» Maintenance
» Data Integration/BI
» Information Management
Programming
  Database
Automation
OS/Networking
Graphics
Links
Tools
» Regular Expr Tester
» Free Tools

Take advantage of the new math functions

Total Hit ( 2997)

Rate this article:     Poor     Excellent 

 Submit Your Question/Comment about this article

Rating


 


The System.Math class exposes several static methods that let you perform many common operations. These functions replace the VB6 functions with same name, but there are a few new functions that have no direct VB6 counterpart:

Ceiling(x) returns the integer equal or higher than the argument
Floor(x) returns the integer equal or lower than the argument
IEEERemainder(x, y) returns the remainder of the x/y division; it's similar to the MOD operator, but it works correctly also with floating point numbers
Log10(x) returns the base 10 logarithm of the argument
Min(x,y) returns the lowest of the two arguments
Max(x,y) returns the hiighest of the two arguments
Atan2(x, y) returns the arc-tangent of x/y; it is similar to Atan, but it works correctly in all four quadrants
Sinh(x), Cosh(x), Tanh(x) return the hyperbolic sine, cosine, and tange of the argument

Click here to copy the following block
Console.WriteLine(Math.Ceiling(2.5))  ' displays 3
Console.WriteLine(Math.Floor(-3.8))  ' displays -4

Finally, the Math class also exposes the E (Neper number) and PI constants.


Submitted By : Nayan Patel  (Member Since : 5/26/2004 12:23:06 PM)

Job Description : He is the moderator of this site and currently working as an independent consultant. He works with VB.net/ASP.net, SQL Server and other MS technologies. He is MCSD.net, MCDBA and MCSE. In his free time he likes to watch funny movies and doing oil painting.
View all (893) submissions by this author  (Birth Date : 7/14/1981 )


Home   |  Comment   |  Contact Us   |  Privacy Policy   |  Terms & Conditions   |  BlogsZappySys

© 2008 BinaryWorld LLC. All rights reserved.