> Not near ready for prime time, though- it's bare-bones function, poor
> formatting, few comments, no docs, meets no standards yet, and there
> are some sections I want to refactor.

Try this alternative bit of code for formatting a decimal # with zero-
padding... it generates the same '000.00' format as your code, but
doesn't involve any while() loops:
------------------------
function formatBeats(b) {
        var out='000'+b.toString()+(b==Math.floor(b)?'.':'')+'000';
        return out.substr(out.indexOf('.')-3,6);
};
------------------------

enjoy,
-e
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To post to this group, send email to TiddlyWiki@googlegroups.com
To unsubscribe from this group, send email to 
tiddlywiki+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/TiddlyWiki?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to