MCPcopy Index your code
hub / github.com/stemkoski/stemkoski.github.com / numDecimals

Function numDecimals

MathBox/dat.gui.js:792–799  ·  view source on GitHub ↗
(x)

Source from the content-addressed store, hash-verified

790 );
791
792 function numDecimals(x) {
793 x = x.toString();
794 if (x.indexOf('.') > -1) {
795 return x.length - x.indexOf('.') - 1;
796 } else {
797 return 0;
798 }
799 }
800
801 return NumberController;
802

Callers 2

NumberControllerFunction · 0.85
dat.gui.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected