A student wrote in today asking about using Math.round() and getting results to two decimal places. Two links that describe the old multiply by 100 and then divide by 100 method are
- From Sun Developer Forums, http://forum.java.sun.com/thread.jspa?threadID=545068&tstart=45
- From Roedy Green’s Java & Internet Glossary, http://mindprod.com/jgloss/round.html
And here is one that describes displaying a result to two decimal places, rounded or not, http://www.gamedev.net/community/forums/topic.asp?topic_id=390114
Post a Comment