Convert a single data item to (x, y) point.
Parameter data is an array which the first element is radius and the second is angle
@param {Array.<number>} data
@param {boolean} [clamp=false]
@return {Array.<number>}
357171
function (data, clamp) {
        return this.coordToPoint([
            this._radiusAxis.dataToRadius(data[0], clamp),
            this._angleAxis.dataToAngle(data[1], clamp)
        ]);
    }
302558
function (data, redraw) {
		var series = this,
			oldData = series.points,
			options = series.options,
			chart = series.chart,
			firstPoint = null,
			xAxis = series.xAxis,
			names = xAxis && xAxis.categories && !xAxis.categories.length ? [] : null,
			i;

		// reset properties
		series.xIncrement = null;
		series.pointRange = xAxis && xAxis.categories ? 1 : options.pointRange;

		series.colorCounter = 0; // for series with colorByPoint (#1547)
		
		// parallel arrays
		var xData = [],
			yData = [],
			zData = [],
			dataLength = data ? data.length : [],
			turboThreshold = pick(options.turboThreshold, 1000),
			pt,
			pointArrayMap = series.pointArrayMap,
			valueCount = pointArrayMap && pointArrayMap.length,
			hasToYData = !!series.toYData;

		// In turbo mode, only one- or twodimensional arrays of numbers are allowed. The
		// first value is tested, and we assume that all the rest are defined the same
		// way. Although the 'for' loops are similar, they are repeated inside each
		// if-else conditional for max performance.
		if (turboThreshold && dataLength > turboThreshold) { 
			
			// find the first non-null point
			i = 0;
			while (firstPoint === null && i < dataLength) {
				firstPoint = data[i];
				i++;
			}
		
		
			if (isNumber(firstPoint)) { // assume all points are numbers
				var x = pick(options.pointStart, 0),
					pointInterval = pick(options.pointInterval, 1);

				for (i = 0; i < dataLength; i++) {
					xData[i] = x;
					yData[i] = data[i];
					x += pointInterval;
				}
				series.xIncrement = x;
			} else if (isArray(firstPoint)) { // assume all points are arrays
				if (valueCount) { // [x, low, high] or [x, o, h, l, c]
					for (i = 0; i < dataLength; i++) {
						pt = data[i];
						xData[i] = pt[0];
						yData[i] = pt.slice(1, valueCount + 1);
					}
				} else { // [x, y]
					for (i = 0; i < dataLength; i++) {
						pt = data[i];
						xData[i] = pt[0];
						yData[i] = pt[1];
					}
				}
			} else {
				error(12); // Highcharts expects configs to be numbers or arrays in turbo mode
			}
		} else {
			for (i = 0; i < dataLength; i++) {
				if (data[i] !== UNDEFINED) { // stray commas in oldIE
					pt = { series: series };
					series.pointClass.prototype.applyOptions.apply(pt, [data[i]]);
					xData[i] = pt.x;
					yData[i] = hasToYData ? series.toYData(pt) : pt.y;
					zData[i] = pt.z;
					if (names && pt.name) {
						names[pt.x] = pt.name; // #2046
					}
				}
			}
		}
		
		// Forgetting to cast strings to numbers is a common caveat when handling CSV or JSON		
		if (isString(yData[0])) {
			error(14, true);
		} 

		series.data = [];
		series.options.data = data;
		series.xData = xData;
		series.yData = yData;
		series.zData = zData;
		series.names = names;

		// destroy old points
		i = (oldData && oldData.length) || 0;
		while (i--) {
			if (oldData[i] && oldData[i].destroy) {
				oldData[i].destroy();
			}
		}

		// reset minRange (#878)
		if (xAxis) {
			xAxis.minRange = xAxis.userMinRange;
		}

		// redraw
		series.isDirty = series.isDirtyData = chart.isDirtyBox = true;
		if (pick(redraw, true)) {
			chart.redraw(false);
		}
	}
66127
function (inData, outData, width, height, options) {
        options = defaultOptions(options, {strength: 1});
        var a = clamp(options.strength, 0, 1) * 5;
        convolve3x3(inData, outData, width, height,
            [
                [ 0, -a, 0],
                [-a, 0, a],
                [ 0, a, 0]
            ],
            false, true);
    }
1207281
function parseGridData(data, getPosition, getWeight = null) {
  const pointCount = count(data);
  const positions = new Float32Array(pointCount * 2);
  const positions64xyLow = new Float32Array(pointCount * 2);
  const weightValues = new Float32Array(pointCount * 3);

  let yMin = Infinity;
  let yMax = -Infinity;
  let xMin = Infinity;
  let xMax = -Infinity;
  let y;
  let x;
  const {iterable, objectInfo} = createIterable(data);
  for (const object of iterable) {
    objectInfo.index++;
    const position = getPosition(object, objectInfo);
    const {index} = objectInfo;
    x = position[0];
    y = position[1];
    positions[index * 2] = x;
    positions[index * 2 + 1] = y;

    positions64xyLow[index * 2] = fp64LowPart(x);
    positions64xyLow[index * 2 + 1] = fp64LowPart(y);

    const weight = getWeight ? getWeight(object, objectInfo) : DEFAULT_WEIGHT;
    // Aggregator expects each weight is an array of size 3
    if (Array.isArray(weight)) {
      weightValues[index * 3] = weight[0];
      weightValues[index * 3 + 1] = weight[1];
      weightValues[index * 3 + 2] = weight[2];
    } else {
      // backward compitability
      weightValues[index * 3] = weight;
    }

    if (Number.isFinite(y) && Number.isFinite(x)) {
      yMin = y < yMin ? y : yMin;
      yMax = y > yMax ? y : yMax;

      xMin = x < xMin ? x : xMin;
      xMax = x > xMax ? x : xMax;
    }
  }
  const weights = {
    weight1: {
      size: 1,
      operation: AGGREGATION_OPERATION.SUM,
      needMax: true,
      values: weightValues
    }
  };
  const boundingBox = {xMin, xMax, yMin, yMax};
  return {
    positions,
    positions64xyLow,
    weights,
    boundingBox
  };
}
1246310
public static PlotCanvas plot(double[] data) {
        double[] lowerBound = {0, Math.min(data)};
        double[] upperBound = {1, Math.max(data)};

        PlotCanvas canvas = new PlotCanvas(lowerBound, upperBound);
        canvas.add(new BoxPlot(data));

        canvas.getAxis(0).setGridVisible(false);
        canvas.getAxis(0).setLabelVisible(false);

        return canvas;
    }
762879
function(node) {
        var ringPoints = [];
        var coords = node.getElementsByTagName("COORDS");

        if (coords.length > 0) {
            // if coords is present, it's the only coords item
            var coordArr = this.getChildValue(coords[0]);
            coordArr = coordArr.split(/;/);
            for (var cn = 0; cn < coordArr.length; cn++) {
                var coordItems = coordArr[cn].split(/ /);
                ringPoints.push(new OpenLayers.Geometry.Point(coordItems[0], coordItems[1]));
            }
            coords = null;
        } else {
            var point = node.getElementsByTagName("POINT");
            if (point.length > 0) {
                for (var pn = 0; pn < point.length; pn++) {
                    ringPoints.push(
                        new OpenLayers.Geometry.Point(
                            parseFloat(point[pn].getAttribute("x")),
                            parseFloat(point[pn].getAttribute("y"))
                        )
                    );
                }
            }
            point = null;
        }

        return new OpenLayers.Geometry.LinearRing(ringPoints);      
    }
1051999
function clamp(index, len, defaultValue) {
  if (typeof index !== 'number') return defaultValue;
  index = ~~index;  // Coerce to integer.
  if (index >= len) return len;
  if (index >= 0) return index;
  index += len;
  if (index >= 0) return index;
  return 0;
}
1289777
function (x, y) {
                var matrix = selectedShape.node().getCTM(),
                    position = chart.svg.node().createSVGPoint();
                position.x = x || 0;
                position.y = y || 0;
                return position.matrixTransform(matrix);
            }
156964
private void addVertex(String data)
	{
		String coords[] = data.split("\\s+");
		float x = 0;
		float y = 0;
		float z = 0;
		if (coords.length != 3)
		{
			MalisisCore.log.error("[ObjFileImporter] Wrong coordinates number {} at line {} : {}", coords.length, lineNumber, currentLine);
		}
		else
		{
			x = Float.parseFloat(coords[0]);
			y = Float.parseFloat(coords[1]);
			z = Float.parseFloat(coords[2]);
		}

		vertexes.add(new Vertex(x, y, z));
	}
867624
function(x, y) {
        var array = this.getAllData(x, y);
        return array && array.length ? array[0] : undefined;
    }
918679
public static boolean isConvex(double[] data, int points)
    {
        if (points < 3)
        {
            return true;
        }
        for (int i1 = 0; i1 < points; i1++)
        {
            int i2 = (i1 + 1) % points;
            int i3 = (i2 + 1) % points;
            double x1 = data[2 * i1];
            double y1 = data[2 * i1 + 1];
            double x2 = data[2 * i2];
            double y2 = data[2 * i2 + 1];
            double x3 = data[2 * i3];
            double y3 = data[2 * i3 + 1];
            if (Vectors.isClockwise(x1, y1, x2, y2, x3, y3))
            {
                return false;
            }
        }
        return true;
    }
450468
def set_data(self, data=None, **kwargs):
        
        if data is None:
            pos = None
        else:
            if isinstance(data, tuple):
                pos = np.array(data).T.astype(np.float32)
            else:
                pos = np.atleast_1d(data).astype(np.float32)

            if pos.ndim == 1:
                pos = pos[:, np.newaxis]
            elif pos.ndim > 2:
                raise ValueError('data must have at most two dimensions')

            if pos.size == 0:
                pos = self._line.pos

                # if both args and keywords are zero, then there is no
                # point in calling this function.
                if len(kwargs) == 0:
                    raise TypeError("neither line points nor line properties"
                                    "are provided")
            elif pos.shape[1] == 1:
                x = np.arange(pos.shape[0], dtype=np.float32)[:, np.newaxis]
                pos = np.concatenate((x, pos), axis=1)
            # if args are empty, don't modify position
            elif pos.shape[1] > 3:
                raise TypeError("Too many coordinates given (%s; max is 3)."
                                % pos.shape[1])

        # todo: have both sub-visuals share the same buffers.
        line_kwargs = {}
        for k in self._line_kwargs:
            if k in kwargs:
                k_ = self._kw_trans[k] if k in self._kw_trans else k
                line_kwargs[k] = kwargs.pop(k_)
        if pos is not None or len(line_kwargs) > 0:
            self._line.set_data(pos=pos, **line_kwargs)

        marker_kwargs = {}
        for k in self._marker_kwargs:
            if k in kwargs:
                k_ = self._kw_trans[k] if k in self._kw_trans else k
                marker_kwargs[k_] = kwargs.pop(k)
        if pos is not None or len(marker_kwargs) > 0:
            self._markers.set_data(pos=pos, **marker_kwargs)
        if len(kwargs) > 0:
            raise TypeError("Invalid keyword arguments: %s" % kwargs.keys())
695443
function(data) {
		if( typeof data == "string" ) {
			var transformed = {};
			$.each(data.split(/\s/), function() {
				transformed[this] = true;
			});
			data = transformed;
		}
		return data;
	}
659216
function getGeometry(data) {
  if (data.attributes) {
    validateGeometryAttributes(data.attributes);
    if (data instanceof Geometry) {
      return data;
    } else {
      return new Geometry(data);
    }
  } else if (data.positions || data.POSITION) {
    validateGeometryAttributes(data);
    return new Geometry({
      attributes: data
    });
  }
  throw Error('Invalid mesh');
}
415894
function getLengthAngle(x1, x2, y1, y2) {
  var xDiff = x2 - x1;

  var yDiff = y2 - y1;

  return {
    length: Math.ceil(Math.sqrt(xDiff * xDiff + yDiff * yDiff)),
    angle: Math.round(Math.atan2(yDiff, xDiff) * 180 / Math.PI)
  };
}
340834
function (data) {
	var tempColorFunction = new L.PiecewiseFunction([new L.HSLHueFunction(new L.Point(100,270), new L.Point(210,270), {outputLuminosity: '25%'}), new L.HSLHueFunction(new L.Point(210,270), new L.Point(320,0), {outputLuminosity: '25%'})]);
	var tempFillColorFunction = new L.PiecewiseFunction([new L.HSLHueFunction(new L.Point(100,270), new L.Point(210,270), {outputLuminosity: '50%'}), new L.HSLHueFunction(new L.Point(210,270), new L.Point(320,0), {outputLuminosity: '50%'})]);
	var radiusFunction = new L.LinearFunction(new L.Point(272,5), new L.Point(320,15));
	var K_TO_C = 273.15;
	var convert = function (value) {
		var celsius = value - K_TO_C;
		var farenheit = (9/5) * celsius + 32;
		
		return {
			c: celsius,
			f: farenheit
		};
	};
	
	var options = {
		recordsField: 'list',
		latitudeField: 'coord.lat',
		longitudeField: 'coord.lon',
		displayOptions: {
			'main.temp': {
				displayName: 'Temperature',
				color: tempColorFunction,
				fillColor: tempFillColorFunction,
				radius: radiusFunction,
				displayText: function (value) {
					var values = convert(value);
					
					return values.f.toFixed(0) + '&deg;F / ' + values.c.toFixed(0) + '&deg;C';
				}
			}
		},
		layerOptions: {
			width: 5,
			weight: 1,
			iconSize: new L.Point(60,40),
			fillOpacity: 0.8,
			opacity: 1.0,
			radius: 6
		},
		tooltipOptions: {
			iconSize: new L.Point(100,55),
			iconAnchor: new L.Point(-5,55)
		},
		onEachRecord: function (layer,record) {
			var html = '<table class="table table-condensed table-striped table-bordered"><thead><tr><th>Name</th><th>Value</th></tr></thead><tbody></tbody></table>';
			var $html = $(html);
			var $tbody = $html.find('tbody');
			
			for (var property in record.main) {
				$tbody.append('<tr><td>' + property + '</td><td>' + record.main[property] + '</td></tr>');
			}
			layer.bindPopup($html.wrap('<div/>').parent().html(),{
				minWidth: 400,
				maxWidth: 400
			});
		}
	};
	
	var weatherLayer = new L.MapMarkerDataLayer(data, options);

	map.addLayer(weatherLayer);
	
	if (!lastWeatherLayer) {		
		var legend = weatherLayer.getLegend({
			numSegments: 20,
			width: 80,
			className: 'well'
		});
		
		$('#legend').append(legend);
	}
	
	lastWeatherLayer = weatherLayer;
	
}
43861
function(data) {
      var view = new DataView(data.buffer, data.byteOffset, data.byteLength);
      return {
        dataReferenceIndex: view.getUint16(6),
        width: view.getUint16(24),
        height: view.getUint16(26),
        horizresolution: view.getUint16(28) + (view.getUint16(30) / 16),
        vertresolution: view.getUint16(32) + (view.getUint16(34) / 16),
        frameCount: view.getUint16(40),
        depth: view.getUint16(74),
        config: inspectMp4(data.subarray(78, data.byteLength))
      };
    }