Try this... For truncate: var intValue = Math.floor(value); For round: var intValue = Math.round(value); ~m
On Fri, Jul 10, 2009 at 10:13 AM, Rob Campbell <[email protected]>wrote: > > nope. They all do the same thing. > > All numbers in JS are floats, though it might be a nice feature to do > properly rounded integers for %i or decimals for %d. > > On Jul 9, 10:04 am, andrew8088 <[email protected]> wrote: > > I hope this doesn't seem like too basic of a question: I can't seem to > > find a difference between %d, %i, or %f in string substitution. Is > > there a difference? > > > > Thanks, > > Andrew > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Firebug" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/firebug?hl=en -~----------~----~----~----~------~----~------~--~---
