i tried searching for it for hours but cant find anything.

Here is a link to the MSDN docs for the System.Math class. Take a look and see if there is any method in there that can help.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.