Author Topic: Numbers  (Read 1074 times)

!8bit!man

  • Active Member
  • ***
  • Posts: 210
  • Karma: +0/-0
  • Hack Hack Hack!!
    • View Profile
Numbers
« on: Sun, May 13, 2012 »
How can i display a number with only three digits after the decimal point? For now i can only display one that have a lot of number after the decimal point....

photonstorm

  • Administrator
  • Key Contributor
  • *****
  • Posts: 1502
  • Karma: +1/-0
    • View Profile
    • Photon Storm
Re: Numbers
« Reply #1 on: Sun, May 13, 2012 »
var a:Number = 34.666999;

trace(a.toFixed(3)); // 34.666
http://www.photonstorm.com



"Tell me and I will forget, show me and I might remember, involve me and I will understand" - Confucius

!8bit!man

  • Active Member
  • ***
  • Posts: 210
  • Karma: +0/-0
  • Hack Hack Hack!!
    • View Profile
Re: Numbers
« Reply #2 on: Sun, May 13, 2012 »
Thanks a lot man....