Coding Problems and Errors:
Thursday, January 21, 2010
Rounding a number without "if"s
Rounding a "double" number without using "if" statements
double num;
int num_rounded = static_cast<int>(floor(num+0.5));
No comments:
Post a Comment
Back to Top
Older Post
Home
Labels
.mp4
(1)
.NET
(1)
Algorithms
(2)
Array
(1)
Arrays.sort()
(1)
ASP.NET
(3)
Blogger
(2)
C++
(4)
clone
(1)
CPU
(1)
Dreamweaver
(1)
Gmail
(1)
Graph
(1)
Hauppauge
(1)
java
(4)
Knuth
(1)
LaTeX
(2)
List
(1)
MPEG-4
(1)
MS Excel
(2)
MS Word
(1)
namespace
(1)
Register
(1)
Regsvr32
(1)
Reporting Services
(2)
serialVersionUID
(1)
shuffle
(1)
sort
(1)
spoolsv.exe
(1)
SQL Server
(2)
TeXnicCenter
(1)
Tips
(2)
twip.me
(1)
twitter
(1)
Ubuntu
(1)
Uninstall
(1)
Unregister
(1)
VB.NET
(1)
vector
(1)
Version
(1)
warning
(2)
win xp
(1)
Windows Media Player
(1)
No comments:
Post a Comment