TODO(nico): be more precise...
438124
function(node, pos){
        var npos = node.pos.getc(true), 
            width = node.getData('width'), 
            height = node.getData('height');
        return this.nodeHelper.ellipse.contains(npos, pos, width, height);
      }
823239
function decimal(_num, _precision) {

	// If _num is undefined, assing 0	
	if(_num === undefined) _num = 0;
	
	// If _precision is undefined, assigned 2
	if(_precision === undefined) _num = 2;

    n = Math.abs(_num);
    
    var sign = '';
    if(_num < 0)
    	sign = '-';
    	
    return sign + n.toFixed(_precision);
}
1081876
function ze(pt,ut,bt,ht){var It=pt.indexOf("."),At=We,wt=Xe,mt,yt,_t,vt,xt,St,kt;// Remove trailing zeros.
for(37>bt&&(pt=pt.toLowerCase()),0<=It&&(_t=dt,dt=0,pt=pt.replace(".",""),kt=new Le(bt),xt=kt.pow(pt.length-It),dt=_t,kt.c=ue(he(ce(xt.c),xt.e),10,ut),kt.e=kt.c.length),St=ue(pt,bt,ut),yt=_t=St.length;0==St[--_t];St.pop());if(!St[0])return"0";if(0>It?--yt:(xt.c=St,xt.e=yt,xt.s=ht,xt=qe(xt,kt,At,wt,ut),St=xt.c,vt=xt.r,yt=xt.e),mt=yt+At+1,It=St[mt],_t=ut/2,vt=vt||0>mt||null!=St[mt+1],vt=4>wt?(null!=It||vt)&&(0==wt||wt==(0>xt.s?3:2)):It>_t||It==_t&&(4==wt||vt||6==wt&&1&St[mt-1]||wt==(0>xt.s?8:7)),1>mt||!St[0])pt=vt?he("1",-At):"0";else{if(St.length=mt,vt)// Rounding up may mean the previous digit has to be rounded up and so on.
for(--ut;++St[--mt]>ut;)St[mt]=0,mt||(++yt,St.unshift(1));// Determine trailing zeros.
for(_t=St.length;!St[--_t];);// E.g. [4, 11, 15] becomes 4bf.
for(It=0,pt="";It<=_t;pt+=Pe.charAt(St[It++]));pt=he(pt,yt)}// The caller will add the sign.
return pt}
909790
function round (float, precision) {
  precision = (precision === undefined ? 10 : precision)
  return parseFloat(float.toFixed(precision), 10)
}
650636
def _snapping_round(num, eps, resolution):
    

    rounded = round(num)
    delta = abs(num - rounded)
    if delta < eps:
        return int(rounded)
    else:
        return int(resolution(num))
783644
function() {
			var mag = this.x * this.x + this.y * this.y;
			if (mag > 0) {
				mag = 1.0 / Math.sqrt(mag);
				this.x *= mag;
				this.y *= mag;
			}
			return this;
		}
1337208
function() {

      // atan(c) = i / 2 log((i + x) / (i - x))

      var a = this['re'];
      var b = this['im'];

      if (a === 0) {

        if (b === 1) {
          return new Complex(0, Infinity);
        }

        if (b === -1) {
          return new Complex(0, -Infinity);
        }
      }

      var d = a * a + (1.0 - b) * (1.0 - b);

      var t1 = new Complex(
              (1 - b * b - a * a) / d,
              -2 * a / d).log();

      return new Complex(-0.5 * t1['im'], 0.5 * t1['re']);
    }
1205467
def _round_frac(x, precision):
    
    if not np.isfinite(x) or x == 0:
        return x
    else:
        frac, whole = np.modf(x)
        if whole == 0:
            digits = -int(np.floor(np.log10(abs(frac)))) - 1 + precision
        else:
            digits = precision
        return np.around(x, digits)
437630
function(){
		// とりあえず盤面全部の対応だけ
		var d0 = this.area, d = {x1:d0.x1,y1:d0.y1,x2:d0.x2,y2:d0.y2};
		var key_undo = this.board.exec.boardtype[this.old][0];
		if(key_undo & this.TURN){ var tmp=d.x1;d.x1=d.y1;d.y1=tmp;}
		this.exec(key_undo,d);
	}
229856
function() {
			if (Math.abs(this.x) < 0.5) {
				this.x = 0;
			} else {
				this.x = this.x < 0 ? -1 : 1;
				this.y = this.z = 0;
			}
			if (Math.abs(this.y) < 0.5) {
				this.y = 0;
			} else {
				this.y = this.y < 0 ? -1 : 1;
				this.x = this.z = 0;
			}
			if (Math.abs(this.z) < 0.5) {
				this.z = 0;
			} else {
				this.z = this.z < 0 ? -1 : 1;
				this.x = this.y = 0;
			}
			return this;
		}
926031
function(ratio, opt) {

            if (ratio <= 0) return 0;
            if (ratio >= 1) return 1;

            opt = opt || {};
            var precision = (opt.precision === undefined) ? this.PRECISION : opt.precision;
            var subdivisions = (opt.subdivisions === undefined) ? this.getSubdivisions({ precision: precision }) : opt.subdivisions;
            var localOpt = { precision: precision, subdivisions: subdivisions };

            var curveLength = this.length(localOpt);
            var length = curveLength * ratio;

            return this.tAtLength(length, localOpt);
        }
1204568
def needle(self, serie):
        """"""
        serie_node = self.svg.serie(serie)
        for i, theta in enumerate(serie.values):
            if theta is None:
                continue

            def point(x, y):
                return '%f %f' % self.view((x, y))

            val = self._format(serie, i)
            metadata = serie.metadata.get(i)
            gauges = decorate(
                self.svg, self.svg.node(serie_node['plot'], class_="dots"),
                metadata
            )

            tolerance = 1.15

            if theta < self._min:
                theta = self._min * tolerance

            if theta > self._max:
                theta = self._max * tolerance

            w = (self._box._tmax - self._box._tmin + self.view.aperture) / 4

            if self.logarithmic:
                w = min(w, self._min - self._min * 10**-10)

            alter(
                self.svg.node(
                    gauges,
                    'path',
                    d='M %s L %s A %s 1 0 1 %s Z' % (
                        point(.85, theta),
                        point(self.needle_width, theta - w),
                        '%f %f' % (self.needle_width, self.needle_width),
                        point(self.needle_width, theta + w),
                    ),
                    class_='line reactive tooltip-trigger'
                ), metadata
            )

            x, y = self.view((.75, theta))
            self._tooltip_data(gauges, val, x, y, xlabel=self._get_x_label(i))
            self._static_value(serie_node, val, x, y, metadata)
50976
function init$3() {
        if (this.es === undefined || this.es <= 0) {
            throw new Error('incorrect elliptical usage');
        }

        this.x0 = this.x0 !== undefined ? this.x0 : 0;
        this.y0 = this.y0 !== undefined ? this.y0 : 0;
        this.long0 = this.long0 !== undefined ? this.long0 : 0;
        this.lat0 = this.lat0 !== undefined ? this.lat0 : 0;

        this.cgb = [];
        this.cbg = [];
        this.utg = [];
        this.gtu = [];

        var f = this.es / (1 + Math.sqrt(1 - this.es));
        var n = f / (2 - f);
        var np = n;

        this.cgb[0] = n * (2 + n * (-2 / 3 + n * (-2 + n * (116 / 45 + n * (26 / 45 + n * (-2854 / 675 ))))));
        this.cbg[0] = n * (-2 + n * ( 2 / 3 + n * ( 4 / 3 + n * (-82 / 45 + n * (32 / 45 + n * (4642 / 4725))))));

        np = np * n;
        this.cgb[1] = np * (7 / 3 + n * (-8 / 5 + n * (-227 / 45 + n * (2704 / 315 + n * (2323 / 945)))));
        this.cbg[1] = np * (5 / 3 + n * (-16 / 15 + n * ( -13 / 9 + n * (904 / 315 + n * (-1522 / 945)))));

        np = np * n;
        this.cgb[2] = np * (56 / 15 + n * (-136 / 35 + n * (-1262 / 105 + n * (73814 / 2835))));
        this.cbg[2] = np * (-26 / 15 + n * (34 / 21 + n * (8 / 5 + n * (-12686 / 2835))));

        np = np * n;
        this.cgb[3] = np * (4279 / 630 + n * (-332 / 35 + n * (-399572 / 14175)));
        this.cbg[3] = np * (1237 / 630 + n * (-12 / 5 + n * ( -24832 / 14175)));

        np = np * n;
        this.cgb[4] = np * (4174 / 315 + n * (-144838 / 6237));
        this.cbg[4] = np * (-734 / 315 + n * (109598 / 31185));

        np = np * n;
        this.cgb[5] = np * (601676 / 22275);
        this.cbg[5] = np * (444337 / 155925);

        np = Math.pow(n, 2);
        this.Qn = this.k0 / (1 + n) * (1 + np * (1 / 4 + np * (1 / 64 + np / 256)));

        this.utg[0] = n * (-0.5 + n * ( 2 / 3 + n * (-37 / 96 + n * ( 1 / 360 + n * (81 / 512 + n * (-96199 / 604800))))));
        this.gtu[0] = n * (0.5 + n * (-2 / 3 + n * (5 / 16 + n * (41 / 180 + n * (-127 / 288 + n * (7891 / 37800))))));

        this.utg[1] = np * (-1 / 48 + n * (-1 / 15 + n * (437 / 1440 + n * (-46 / 105 + n * (1118711 / 3870720)))));
        this.gtu[1] = np * (13 / 48 + n * (-3 / 5 + n * (557 / 1440 + n * (281 / 630 + n * (-1983433 / 1935360)))));

        np = np * n;
        this.utg[2] = np * (-17 / 480 + n * (37 / 840 + n * (209 / 4480 + n * (-5569 / 90720 ))));
        this.gtu[2] = np * (61 / 240 + n * (-103 / 140 + n * (15061 / 26880 + n * (167603 / 181440))));

        np = np * n;
        this.utg[3] = np * (-4397 / 161280 + n * (11 / 504 + n * (830251 / 7257600)));
        this.gtu[3] = np * (49561 / 161280 + n * (-179 / 168 + n * (6601661 / 7257600)));

        np = np * n;
        this.utg[4] = np * (-4583 / 161280 + n * (108847 / 3991680));
        this.gtu[4] = np * (34729 / 80640 + n * (-3418889 / 1995840));

        np = np * n;
        this.utg[5] = np * (-20648693 / 638668800);
        this.gtu[5] = np * (212378941 / 319334400);

        var Z = gatg(this.cbg, this.lat0);
        this.Zb = -this.Qn * (Z + clens(this.gtu, 2 * Z));
    }
1184109
function () {
                        var chai = require('chai');
                        chai.Assertion.addMethod('toBe', function (expected) {
                            return this.equal(expected);
                        });
                        chai.Assertion.addMethod("toBeDefined", function () {
                            return this.defined;
                        });
                        chai.Assertion.addMethod("toBeUndefined", function () {
                            return this.undefined;
                        });
                        chai.Assertion.addMethod("toBeTruthy", function () {
                            return this.ok;
                        });
                        chai.Assertion.addMethod("toBeCloseTo", function (expected, precision) {
                            precision = precision !== undefined ? precision : 2;
                            var delta = (Math.pow(10, -precision) / 2);
                            this.assert(
                                Math.abs(expected - this._obj) < delta
                                , 'expected #{this} to be close to ' + expected + ' +/- ' + delta
                                , 'expected #{this} not to be close to ' + expected + ' +/- ' + delta
                            );
                        });
                        expect = chai.expect;
                        Lavender = require('./lib/lavenderJS-UMD.min.js');
                        jasmine = {};
                    }
45118
function( theta, contrast ){
            this.contrast = typeof contrast === 'number' ? contrast : 0.25;
            this.theta = MathUtils.radians( typeof theta === 'number' ? theta : 10 );
        }
109614
function (beta) {
        beta = Math.max(Math.min(this.maxBeta, beta), this.minBeta);

        this._phi = -beta / 180 * Math.PI;
        this._needsUpdate = true;
    }
371546
function(data, isHorizontal, precision) {
    var visibles = data.datasets.map(function(dataset) {
      if (!dataset._meta) return true;

      for (var i in dataset._meta) {
        return !dataset._meta[i].hidden;
      }
    });
    
    var datasetDataLength = 0;
    if (data && data.datasets && data.datasets[0] && data.datasets[0].data) {
      datasetDataLength = data.datasets[0].data.length;
    }
    var totals = Array.apply(null, new Array(datasetDataLength)).map(function(el, i) {
      return data.datasets.reduce(function(sum, dataset, j) {
        var key = dataset.stack;
        if (!sum[key]) sum[key] = 0;
        sum[key] += Math.abs(dataValue(dataset.data[i], isHorizontal)) * visibles[j];

        return sum;
      }, {});
    });

    data.calculatedData = data.datasets.map(function(dataset, i) {
      return dataset.data.map(function(val, i) {
        var total = totals[i][dataset.stack];
        var dv = dataValue(val, isHorizontal);
        return dv && total ? round(dv / total, precision) : 0;
      });
    });
  }