MCPcopy Index your code
hub / github.com/PixelsCommander/HTML-GL / NumberController

Function NumberController

page/js/dat.gui.js:693–721  ·  view source on GitHub ↗
(object, property, params)

Source from the content-addressed store, hash-verified

691 * @member dat.controllers
692 */
693 var NumberController = function(object, property, params) {
694
695 NumberController.superclass.call(this, object, property);
696
697 params = params || {};
698
699 this.__min = params.min;
700 this.__max = params.max;
701 this.__step = params.step;
702
703 if (common.isUndefined(this.__step)) {
704
705 if (this.initialValue == 0) {
706 this.__impliedStep = 1; // What are we, psychics?
707 } else {
708 // Hey Doug, check this out.
709 this.__impliedStep = Math.pow(10, Math.floor(Math.log(this.initialValue)/Math.LN10))/10;
710 }
711
712 } else {
713
714 this.__impliedStep = this.__step;
715
716 }
717
718 this.__precision = numDecimals(this.__impliedStep);
719
720
721 };
722
723 NumberController.superclass = Controller;
724

Callers

nothing calls this directly

Calls 1

numDecimalsFunction · 0.85

Tested by

no test coverage detected