Click here to Skip to main content
15,889,909 members
Articles / Programming Languages / C#

A Generalized Rounding Method for Floating-Point Numbers

Rate me:
Please Sign up or sign in to vote.
5.00/5 (1 vote)
12 Jun 2011CPOL 12.2K   3  
A C# method which rounds to the nearest multiple of a chosen power of an arbitrary base.

Views

Daily Counts

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
United States United States
Writer, designer, inventor, musician, observer, and critic with many years of experience in each of these areas. I can do without the approval of "experts" because I believe candid statements and penetrating analysis bring greater rewards than a "pat on the back". And if I have something to say when you're not listening, I tell someone else about it.

Comments and Discussions