I am trying to convert a double type into an integer; which in itself isn't too much of a problem.
The problem I am facing is trying to round my numbers, I would use the round() function however, when a number is exactly halfway (1.5) for example I would like it to round down instead of up (which is really the correct way!)
I found a tutorial, however that seems to show what I want to do; however I can't get the thing to work, and cannot for the life of me get my head around it!
What method of rounding are you using? It certainly doesn't match any method of rounding I've ever seen. Rounding .5 up is one of the most common methods used.
Exactly, arithmetic rounding is the mathematically correct way to round. That's why I ++'d helios. He was right. Of course you have ceiling() and floor() but if you can round in either direction, .5 and up should be rounded up.