Take the 2-minute tour ×  Forgive me if I'm too noob about this.
Recently, I post a question regarding the rounding off two
decimal places. Now, How can I get the sum of these numbers but
I only need the two decimals w/out rounding it off. This is
javascript im working.  Example: 12.876 + 36.278 = 49.154. I
need this answer to be... 49.15 only. Or another one: 12.876 + 1
= 13.876. I need this answer to be... 13.87  Here is my code
(with round off to two decimal places)  function civ(){  Super
thanks to those who are helping me everyday! :)  share|improve
this question Thanks Bakudan for helping me edit this one ;) – 
catsgirl008 Mar 24 '11 at 7:10 add comment  3 Answers  up vote 2
down vote accepted Math.floor(N * 100) / 100  Will strip off
past two decimal places; Math.floor() is essentially Round Down
no matter what.  share|improve this answer Gaaah, You're a
genius! Thanks Shad! :> –  catsgirl008 Mar 24 '11 at 7:16 add
comment  Math.floor(N * 100) / 100 may not work always.  For
Example,  4.56 becomes 4.55