Take advantage of the new math functions

Take advantage of the new math functions

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

Console.WriteLine(Math.Ceiling(2.5))   ' displays 3Console.WriteLine(Math.Floor(-3.8))    ' displays -4

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

Share the Post:
Heading photo, Metadata.

What is Metadata?

What is metadata? Well, It’s an odd concept to wrap your head around. Metadata is essentially the secondary layer of data that tracks details about the “regular” data. The regular

XDR solutions

The Benefits of Using XDR Solutions

Cybercriminals constantly adapt their strategies, developing newer, more powerful, and intelligent ways to attack your network. Since security professionals must innovate as well, more conventional endpoint detection solutions have evolved

AI is revolutionizing fraud detection

How AI is Revolutionizing Fraud Detection

Artificial intelligence – commonly known as AI – means a form of technology with multiple uses. As a result, it has become extremely valuable to a number of businesses across

AI innovation

Companies Leading AI Innovation in 2023

Artificial intelligence (AI) has been transforming industries and revolutionizing business operations. AI’s potential to enhance efficiency and productivity has become crucial to many businesses. As we move into 2023, several

data fivetran pricing

Fivetran Pricing Explained

One of the biggest trends of the 21st century is the massive surge in analytics. Analytics is the process of utilizing data to drive future decision-making. With so much of

kubernetes logging

Kubernetes Logging: What You Need to Know

Kubernetes from Google is one of the most popular open-source and free container management solutions made to make managing and deploying applications easier. It has a solid architecture that makes