Prefer single line assignment to 80 character limit
This commit is contained in:
@@ -30,8 +30,7 @@ ol.geom.flat.area.linearRing = function(flatCoordinates, offset, end, stride) {
|
||||
* @param {number} stride Stride.
|
||||
* @return {number} Area.
|
||||
*/
|
||||
ol.geom.flat.area.linearRings =
|
||||
function(flatCoordinates, offset, ends, stride) {
|
||||
ol.geom.flat.area.linearRings = function(flatCoordinates, offset, ends, stride) {
|
||||
var area = 0;
|
||||
var i, ii;
|
||||
for (i = 0, ii = ends.length; i < ii; ++i) {
|
||||
@@ -50,8 +49,7 @@ ol.geom.flat.area.linearRings =
|
||||
* @param {number} stride Stride.
|
||||
* @return {number} Area.
|
||||
*/
|
||||
ol.geom.flat.area.linearRingss =
|
||||
function(flatCoordinates, offset, endss, stride) {
|
||||
ol.geom.flat.area.linearRingss = function(flatCoordinates, offset, endss, stride) {
|
||||
var area = 0;
|
||||
var i, ii;
|
||||
for (i = 0, ii = endss.length; i < ii; ++i) {
|
||||
|
||||
@@ -10,8 +10,7 @@ goog.require('ol.extent');
|
||||
* @param {number} stride Stride.
|
||||
* @return {Array.<number>} Flat centers.
|
||||
*/
|
||||
ol.geom.flat.center.linearRingss =
|
||||
function(flatCoordinates, offset, endss, stride) {
|
||||
ol.geom.flat.center.linearRingss = function(flatCoordinates, offset, endss, stride) {
|
||||
var flatCenters = [];
|
||||
var i, ii;
|
||||
var extent = ol.extent.createEmpty();
|
||||
|
||||
@@ -17,8 +17,7 @@ goog.require('ol.math');
|
||||
* @param {number} y Y.
|
||||
* @param {Array.<number>} closestPoint Closest point.
|
||||
*/
|
||||
ol.geom.flat.closest.point =
|
||||
function(flatCoordinates, offset1, offset2, stride, x, y, closestPoint) {
|
||||
ol.geom.flat.closest.point = function(flatCoordinates, offset1, offset2, stride, x, y, closestPoint) {
|
||||
var x1 = flatCoordinates[offset1];
|
||||
var y1 = flatCoordinates[offset1 + 1];
|
||||
var dx = flatCoordinates[offset2] - x1;
|
||||
@@ -58,8 +57,7 @@ ol.geom.flat.closest.point =
|
||||
* @param {number} maxSquaredDelta Max squared delta.
|
||||
* @return {number} Max squared delta.
|
||||
*/
|
||||
ol.geom.flat.closest.getMaxSquaredDelta =
|
||||
function(flatCoordinates, offset, end, stride, maxSquaredDelta) {
|
||||
ol.geom.flat.closest.getMaxSquaredDelta = function(flatCoordinates, offset, end, stride, maxSquaredDelta) {
|
||||
var x1 = flatCoordinates[offset];
|
||||
var y1 = flatCoordinates[offset + 1];
|
||||
for (offset += stride; offset < end; offset += stride) {
|
||||
@@ -84,8 +82,7 @@ ol.geom.flat.closest.getMaxSquaredDelta =
|
||||
* @param {number} maxSquaredDelta Max squared delta.
|
||||
* @return {number} Max squared delta.
|
||||
*/
|
||||
ol.geom.flat.closest.getsMaxSquaredDelta =
|
||||
function(flatCoordinates, offset, ends, stride, maxSquaredDelta) {
|
||||
ol.geom.flat.closest.getsMaxSquaredDelta = function(flatCoordinates, offset, ends, stride, maxSquaredDelta) {
|
||||
var i, ii;
|
||||
for (i = 0, ii = ends.length; i < ii; ++i) {
|
||||
var end = ends[i];
|
||||
@@ -105,8 +102,7 @@ ol.geom.flat.closest.getsMaxSquaredDelta =
|
||||
* @param {number} maxSquaredDelta Max squared delta.
|
||||
* @return {number} Max squared delta.
|
||||
*/
|
||||
ol.geom.flat.closest.getssMaxSquaredDelta =
|
||||
function(flatCoordinates, offset, endss, stride, maxSquaredDelta) {
|
||||
ol.geom.flat.closest.getssMaxSquaredDelta = function(flatCoordinates, offset, endss, stride, maxSquaredDelta) {
|
||||
var i, ii;
|
||||
for (i = 0, ii = endss.length; i < ii; ++i) {
|
||||
var ends = endss[i];
|
||||
|
||||
@@ -12,8 +12,7 @@ goog.require('ol.extent');
|
||||
* @param {ol.Extent} extent Extent.
|
||||
* @return {boolean} Contains extent.
|
||||
*/
|
||||
ol.geom.flat.contains.linearRingContainsExtent =
|
||||
function(flatCoordinates, offset, end, stride, extent) {
|
||||
ol.geom.flat.contains.linearRingContainsExtent = function(flatCoordinates, offset, end, stride, extent) {
|
||||
var outside = ol.extent.forEachCorner(extent,
|
||||
/**
|
||||
* @param {ol.Coordinate} coordinate Coordinate.
|
||||
@@ -35,8 +34,7 @@ ol.geom.flat.contains.linearRingContainsExtent =
|
||||
* @param {number} y Y.
|
||||
* @return {boolean} Contains (x, y).
|
||||
*/
|
||||
ol.geom.flat.contains.linearRingContainsXY =
|
||||
function(flatCoordinates, offset, end, stride, x, y) {
|
||||
ol.geom.flat.contains.linearRingContainsXY = function(flatCoordinates, offset, end, stride, x, y) {
|
||||
// http://www.ecse.rpi.edu/Homepages/wrf/Research/Short_Notes/pnpoly.html
|
||||
var contains = false;
|
||||
var x1 = flatCoordinates[end - stride];
|
||||
@@ -65,8 +63,7 @@ ol.geom.flat.contains.linearRingContainsXY =
|
||||
* @param {number} y Y.
|
||||
* @return {boolean} Contains (x, y).
|
||||
*/
|
||||
ol.geom.flat.contains.linearRingsContainsXY =
|
||||
function(flatCoordinates, offset, ends, stride, x, y) {
|
||||
ol.geom.flat.contains.linearRingsContainsXY = function(flatCoordinates, offset, ends, stride, x, y) {
|
||||
goog.asserts.assert(ends.length > 0, 'ends should not be an empty array');
|
||||
if (ends.length === 0) {
|
||||
return false;
|
||||
@@ -95,8 +92,7 @@ ol.geom.flat.contains.linearRingsContainsXY =
|
||||
* @param {number} y Y.
|
||||
* @return {boolean} Contains (x, y).
|
||||
*/
|
||||
ol.geom.flat.contains.linearRingssContainsXY =
|
||||
function(flatCoordinates, offset, endss, stride, x, y) {
|
||||
ol.geom.flat.contains.linearRingssContainsXY = function(flatCoordinates, offset, endss, stride, x, y) {
|
||||
goog.asserts.assert(endss.length > 0, 'endss should not be an empty array');
|
||||
if (endss.length === 0) {
|
||||
return false;
|
||||
|
||||
@@ -10,8 +10,7 @@ goog.require('goog.asserts');
|
||||
* @param {number} stride Stride.
|
||||
* @return {number} offset Offset.
|
||||
*/
|
||||
ol.geom.flat.deflate.coordinate =
|
||||
function(flatCoordinates, offset, coordinate, stride) {
|
||||
ol.geom.flat.deflate.coordinate = function(flatCoordinates, offset, coordinate, stride) {
|
||||
goog.asserts.assert(coordinate.length == stride,
|
||||
'length of the coordinate array should match stride');
|
||||
var i, ii;
|
||||
@@ -29,8 +28,7 @@ ol.geom.flat.deflate.coordinate =
|
||||
* @param {number} stride Stride.
|
||||
* @return {number} offset Offset.
|
||||
*/
|
||||
ol.geom.flat.deflate.coordinates =
|
||||
function(flatCoordinates, offset, coordinates, stride) {
|
||||
ol.geom.flat.deflate.coordinates = function(flatCoordinates, offset, coordinates, stride) {
|
||||
var i, ii;
|
||||
for (i = 0, ii = coordinates.length; i < ii; ++i) {
|
||||
var coordinate = coordinates[i];
|
||||
@@ -53,8 +51,7 @@ ol.geom.flat.deflate.coordinates =
|
||||
* @param {Array.<number>=} opt_ends Ends.
|
||||
* @return {Array.<number>} Ends.
|
||||
*/
|
||||
ol.geom.flat.deflate.coordinatess =
|
||||
function(flatCoordinates, offset, coordinatess, stride, opt_ends) {
|
||||
ol.geom.flat.deflate.coordinatess = function(flatCoordinates, offset, coordinatess, stride, opt_ends) {
|
||||
var ends = opt_ends ? opt_ends : [];
|
||||
var i = 0;
|
||||
var j, jj;
|
||||
@@ -77,8 +74,7 @@ ol.geom.flat.deflate.coordinatess =
|
||||
* @param {Array.<Array.<number>>=} opt_endss Endss.
|
||||
* @return {Array.<Array.<number>>} Endss.
|
||||
*/
|
||||
ol.geom.flat.deflate.coordinatesss =
|
||||
function(flatCoordinates, offset, coordinatesss, stride, opt_endss) {
|
||||
ol.geom.flat.deflate.coordinatesss = function(flatCoordinates, offset, coordinatesss, stride, opt_endss) {
|
||||
var endss = opt_endss ? opt_endss : [];
|
||||
var i = 0;
|
||||
var j, jj;
|
||||
|
||||
@@ -12,8 +12,7 @@ goog.require('goog.asserts');
|
||||
* @param {number=} opt_destOffset Destination offset.
|
||||
* @return {Array.<number>} Flat coordinates.
|
||||
*/
|
||||
ol.geom.flat.flip.flipXY =
|
||||
function(flatCoordinates, offset, end, stride, opt_dest, opt_destOffset) {
|
||||
ol.geom.flat.flip.flipXY = function(flatCoordinates, offset, end, stride, opt_dest, opt_destOffset) {
|
||||
var dest, destOffset;
|
||||
if (opt_dest !== undefined) {
|
||||
dest = opt_dest;
|
||||
|
||||
@@ -14,8 +14,7 @@ goog.require('ol.proj');
|
||||
* @param {number} squaredTolerance Squared tolerance.
|
||||
* @return {Array.<number>} Flat coordinates.
|
||||
*/
|
||||
ol.geom.flat.geodesic.line_ =
|
||||
function(interpolate, transform, squaredTolerance) {
|
||||
ol.geom.flat.geodesic.line_ = function(interpolate, transform, squaredTolerance) {
|
||||
// FIXME reduce garbage generation
|
||||
// FIXME optimize stack operations
|
||||
|
||||
@@ -141,8 +140,7 @@ ol.geom.flat.geodesic.greatCircleArc = function(
|
||||
* @param {number} squaredTolerance Squared tolerance.
|
||||
* @return {Array.<number>} Flat coordinates.
|
||||
*/
|
||||
ol.geom.flat.geodesic.meridian =
|
||||
function(lon, lat1, lat2, projection, squaredTolerance) {
|
||||
ol.geom.flat.geodesic.meridian = function(lon, lat1, lat2, projection, squaredTolerance) {
|
||||
var epsg4326Projection = ol.proj.get('EPSG:4326');
|
||||
return ol.geom.flat.geodesic.line_(
|
||||
/**
|
||||
@@ -165,8 +163,7 @@ ol.geom.flat.geodesic.meridian =
|
||||
* @param {number} squaredTolerance Squared tolerance.
|
||||
* @return {Array.<number>} Flat coordinates.
|
||||
*/
|
||||
ol.geom.flat.geodesic.parallel =
|
||||
function(lat, lon1, lon2, projection, squaredTolerance) {
|
||||
ol.geom.flat.geodesic.parallel = function(lat, lon1, lon2, projection, squaredTolerance) {
|
||||
var epsg4326Projection = ol.proj.get('EPSG:4326');
|
||||
return ol.geom.flat.geodesic.line_(
|
||||
/**
|
||||
|
||||
@@ -9,8 +9,7 @@ goog.provide('ol.geom.flat.inflate');
|
||||
* @param {Array.<ol.Coordinate>=} opt_coordinates Coordinates.
|
||||
* @return {Array.<ol.Coordinate>} Coordinates.
|
||||
*/
|
||||
ol.geom.flat.inflate.coordinates =
|
||||
function(flatCoordinates, offset, end, stride, opt_coordinates) {
|
||||
ol.geom.flat.inflate.coordinates = function(flatCoordinates, offset, end, stride, opt_coordinates) {
|
||||
var coordinates = opt_coordinates !== undefined ? opt_coordinates : [];
|
||||
var i = 0;
|
||||
var j;
|
||||
@@ -30,8 +29,7 @@ ol.geom.flat.inflate.coordinates =
|
||||
* @param {Array.<Array.<ol.Coordinate>>=} opt_coordinatess Coordinatess.
|
||||
* @return {Array.<Array.<ol.Coordinate>>} Coordinatess.
|
||||
*/
|
||||
ol.geom.flat.inflate.coordinatess =
|
||||
function(flatCoordinates, offset, ends, stride, opt_coordinatess) {
|
||||
ol.geom.flat.inflate.coordinatess = function(flatCoordinates, offset, ends, stride, opt_coordinatess) {
|
||||
var coordinatess = opt_coordinatess !== undefined ? opt_coordinatess : [];
|
||||
var i = 0;
|
||||
var j, jj;
|
||||
@@ -55,8 +53,7 @@ ol.geom.flat.inflate.coordinatess =
|
||||
* Coordinatesss.
|
||||
* @return {Array.<Array.<Array.<ol.Coordinate>>>} Coordinatesss.
|
||||
*/
|
||||
ol.geom.flat.inflate.coordinatesss =
|
||||
function(flatCoordinates, offset, endss, stride, opt_coordinatesss) {
|
||||
ol.geom.flat.inflate.coordinatesss = function(flatCoordinates, offset, endss, stride, opt_coordinatesss) {
|
||||
var coordinatesss = opt_coordinatesss !== undefined ? opt_coordinatesss : [];
|
||||
var i = 0;
|
||||
var j, jj;
|
||||
|
||||
@@ -78,8 +78,7 @@ ol.geom.flat.interiorpoint.linearRings = function(flatCoordinates, offset,
|
||||
* @param {Array.<number>} flatCenters Flat centers.
|
||||
* @return {Array.<number>} Interior points.
|
||||
*/
|
||||
ol.geom.flat.interiorpoint.linearRingss =
|
||||
function(flatCoordinates, offset, endss, stride, flatCenters) {
|
||||
ol.geom.flat.interiorpoint.linearRingss = function(flatCoordinates, offset, endss, stride, flatCenters) {
|
||||
goog.asserts.assert(2 * endss.length == flatCenters.length,
|
||||
'endss.length times 2 should be flatCenters.length');
|
||||
var interiorPoints = [];
|
||||
|
||||
@@ -14,8 +14,7 @@ goog.require('goog.math');
|
||||
* @param {Array.<number>=} opt_dest Destination.
|
||||
* @return {Array.<number>} Destination.
|
||||
*/
|
||||
ol.geom.flat.interpolate.lineString =
|
||||
function(flatCoordinates, offset, end, stride, fraction, opt_dest) {
|
||||
ol.geom.flat.interpolate.lineString = function(flatCoordinates, offset, end, stride, fraction, opt_dest) {
|
||||
// FIXME interpolate extra dimensions
|
||||
goog.asserts.assert(0 <= fraction && fraction <= 1,
|
||||
'fraction should be in between 0 and 1');
|
||||
@@ -80,8 +79,7 @@ ol.geom.flat.interpolate.lineString =
|
||||
* @param {boolean} extrapolate Extrapolate.
|
||||
* @return {ol.Coordinate} Coordinate.
|
||||
*/
|
||||
ol.geom.flat.lineStringCoordinateAtM =
|
||||
function(flatCoordinates, offset, end, stride, m, extrapolate) {
|
||||
ol.geom.flat.lineStringCoordinateAtM = function(flatCoordinates, offset, end, stride, m, extrapolate) {
|
||||
if (end == offset) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -14,8 +14,7 @@ goog.require('ol.geom.flat.segments');
|
||||
* @param {ol.Extent} extent Extent.
|
||||
* @return {boolean} True if the geometry and the extent intersect.
|
||||
*/
|
||||
ol.geom.flat.intersectsextent.lineString =
|
||||
function(flatCoordinates, offset, end, stride, extent) {
|
||||
ol.geom.flat.intersectsextent.lineString = function(flatCoordinates, offset, end, stride, extent) {
|
||||
var coordinatesExtent = ol.extent.extendFlatCoordinates(
|
||||
ol.extent.createEmpty(), flatCoordinates, offset, end, stride);
|
||||
if (!ol.extent.intersects(extent, coordinatesExtent)) {
|
||||
@@ -53,8 +52,7 @@ ol.geom.flat.intersectsextent.lineString =
|
||||
* @param {ol.Extent} extent Extent.
|
||||
* @return {boolean} True if the geometry and the extent intersect.
|
||||
*/
|
||||
ol.geom.flat.intersectsextent.lineStrings =
|
||||
function(flatCoordinates, offset, ends, stride, extent) {
|
||||
ol.geom.flat.intersectsextent.lineStrings = function(flatCoordinates, offset, ends, stride, extent) {
|
||||
var i, ii;
|
||||
for (i = 0, ii = ends.length; i < ii; ++i) {
|
||||
if (ol.geom.flat.intersectsextent.lineString(
|
||||
@@ -75,8 +73,7 @@ ol.geom.flat.intersectsextent.lineStrings =
|
||||
* @param {ol.Extent} extent Extent.
|
||||
* @return {boolean} True if the geometry and the extent intersect.
|
||||
*/
|
||||
ol.geom.flat.intersectsextent.linearRing =
|
||||
function(flatCoordinates, offset, end, stride, extent) {
|
||||
ol.geom.flat.intersectsextent.linearRing = function(flatCoordinates, offset, end, stride, extent) {
|
||||
if (ol.geom.flat.intersectsextent.lineString(
|
||||
flatCoordinates, offset, end, stride, extent)) {
|
||||
return true;
|
||||
@@ -109,8 +106,7 @@ ol.geom.flat.intersectsextent.linearRing =
|
||||
* @param {ol.Extent} extent Extent.
|
||||
* @return {boolean} True if the geometry and the extent intersect.
|
||||
*/
|
||||
ol.geom.flat.intersectsextent.linearRings =
|
||||
function(flatCoordinates, offset, ends, stride, extent) {
|
||||
ol.geom.flat.intersectsextent.linearRings = function(flatCoordinates, offset, ends, stride, extent) {
|
||||
goog.asserts.assert(ends.length > 0, 'ends should not be an empty array');
|
||||
if (!ol.geom.flat.intersectsextent.linearRing(
|
||||
flatCoordinates, offset, ends[0], stride, extent)) {
|
||||
@@ -138,8 +134,7 @@ ol.geom.flat.intersectsextent.linearRings =
|
||||
* @param {ol.Extent} extent Extent.
|
||||
* @return {boolean} True if the geometry and the extent intersect.
|
||||
*/
|
||||
ol.geom.flat.intersectsextent.linearRingss =
|
||||
function(flatCoordinates, offset, endss, stride, extent) {
|
||||
ol.geom.flat.intersectsextent.linearRingss = function(flatCoordinates, offset, endss, stride, extent) {
|
||||
goog.asserts.assert(endss.length > 0, 'endss should not be an empty array');
|
||||
var i, ii;
|
||||
for (i = 0, ii = endss.length; i < ii; ++i) {
|
||||
|
||||
@@ -8,8 +8,7 @@ goog.provide('ol.geom.flat.length');
|
||||
* @param {number} stride Stride.
|
||||
* @return {number} Length.
|
||||
*/
|
||||
ol.geom.flat.length.lineString =
|
||||
function(flatCoordinates, offset, end, stride) {
|
||||
ol.geom.flat.length.lineString = function(flatCoordinates, offset, end, stride) {
|
||||
var x1 = flatCoordinates[offset];
|
||||
var y1 = flatCoordinates[offset + 1];
|
||||
var length = 0;
|
||||
@@ -32,8 +31,7 @@ ol.geom.flat.length.lineString =
|
||||
* @param {number} stride Stride.
|
||||
* @return {number} Perimeter.
|
||||
*/
|
||||
ol.geom.flat.length.linearRing =
|
||||
function(flatCoordinates, offset, end, stride) {
|
||||
ol.geom.flat.length.linearRing = function(flatCoordinates, offset, end, stride) {
|
||||
var perimeter =
|
||||
ol.geom.flat.length.lineString(flatCoordinates, offset, end, stride);
|
||||
var dx = flatCoordinates[end - stride] - flatCoordinates[offset];
|
||||
|
||||
@@ -11,8 +11,7 @@ goog.require('ol.geom.flat.reverse');
|
||||
* @param {number} stride Stride.
|
||||
* @return {boolean} Is clockwise.
|
||||
*/
|
||||
ol.geom.flat.orient.linearRingIsClockwise =
|
||||
function(flatCoordinates, offset, end, stride) {
|
||||
ol.geom.flat.orient.linearRingIsClockwise = function(flatCoordinates, offset, end, stride) {
|
||||
// http://tinyurl.com/clockwise-method
|
||||
// https://github.com/OSGeo/gdal/blob/trunk/gdal/ogr/ogrlinearring.cpp
|
||||
var edge = 0;
|
||||
@@ -42,8 +41,7 @@ ol.geom.flat.orient.linearRingIsClockwise =
|
||||
* (counter-clockwise exterior ring and clockwise interior rings).
|
||||
* @return {boolean} Rings are correctly oriented.
|
||||
*/
|
||||
ol.geom.flat.orient.linearRingsAreOriented =
|
||||
function(flatCoordinates, offset, ends, stride, opt_right) {
|
||||
ol.geom.flat.orient.linearRingsAreOriented = function(flatCoordinates, offset, ends, stride, opt_right) {
|
||||
var right = opt_right !== undefined ? opt_right : false;
|
||||
var i, ii;
|
||||
for (i = 0, ii = ends.length; i < ii; ++i) {
|
||||
@@ -78,8 +76,7 @@ ol.geom.flat.orient.linearRingsAreOriented =
|
||||
* (counter-clockwise exterior ring and clockwise interior rings).
|
||||
* @return {boolean} Rings are correctly oriented.
|
||||
*/
|
||||
ol.geom.flat.orient.linearRingssAreOriented =
|
||||
function(flatCoordinates, offset, endss, stride, opt_right) {
|
||||
ol.geom.flat.orient.linearRingssAreOriented = function(flatCoordinates, offset, endss, stride, opt_right) {
|
||||
var i, ii;
|
||||
for (i = 0, ii = endss.length; i < ii; ++i) {
|
||||
if (!ol.geom.flat.orient.linearRingsAreOriented(
|
||||
@@ -104,8 +101,7 @@ ol.geom.flat.orient.linearRingssAreOriented =
|
||||
* @param {boolean=} opt_right Follow the right-hand rule for orientation.
|
||||
* @return {number} End.
|
||||
*/
|
||||
ol.geom.flat.orient.orientLinearRings =
|
||||
function(flatCoordinates, offset, ends, stride, opt_right) {
|
||||
ol.geom.flat.orient.orientLinearRings = function(flatCoordinates, offset, ends, stride, opt_right) {
|
||||
var right = opt_right !== undefined ? opt_right : false;
|
||||
var i, ii;
|
||||
for (i = 0, ii = ends.length; i < ii; ++i) {
|
||||
@@ -137,8 +133,7 @@ ol.geom.flat.orient.orientLinearRings =
|
||||
* @param {boolean=} opt_right Follow the right-hand rule for orientation.
|
||||
* @return {number} End.
|
||||
*/
|
||||
ol.geom.flat.orient.orientLinearRingss =
|
||||
function(flatCoordinates, offset, endss, stride, opt_right) {
|
||||
ol.geom.flat.orient.orientLinearRingss = function(flatCoordinates, offset, endss, stride, opt_right) {
|
||||
var i, ii;
|
||||
for (i = 0, ii = endss.length; i < ii; ++i) {
|
||||
offset = ol.geom.flat.orient.orientLinearRings(
|
||||
|
||||
@@ -7,8 +7,7 @@ goog.provide('ol.geom.flat.reverse');
|
||||
* @param {number} end End.
|
||||
* @param {number} stride Stride.
|
||||
*/
|
||||
ol.geom.flat.reverse.coordinates =
|
||||
function(flatCoordinates, offset, end, stride) {
|
||||
ol.geom.flat.reverse.coordinates = function(flatCoordinates, offset, end, stride) {
|
||||
while (offset < end - stride) {
|
||||
var i;
|
||||
for (i = 0; i < stride; ++i) {
|
||||
|
||||
@@ -16,8 +16,7 @@ goog.provide('ol.geom.flat.segments');
|
||||
* @return {T|boolean} Value.
|
||||
* @template T,S
|
||||
*/
|
||||
ol.geom.flat.segments.forEach =
|
||||
function(flatCoordinates, offset, end, stride, callback, opt_this) {
|
||||
ol.geom.flat.segments.forEach = function(flatCoordinates, offset, end, stride, callback, opt_this) {
|
||||
var point1 = [flatCoordinates[offset], flatCoordinates[offset + 1]];
|
||||
var point2 = [];
|
||||
var ret;
|
||||
|
||||
@@ -12,8 +12,7 @@ goog.require('goog.vec.Mat4');
|
||||
* @param {Array.<number>=} opt_dest Destination.
|
||||
* @return {Array.<number>} Transformed coordinates.
|
||||
*/
|
||||
ol.geom.flat.transform.transform2D =
|
||||
function(flatCoordinates, offset, end, stride, transform, opt_dest) {
|
||||
ol.geom.flat.transform.transform2D = function(flatCoordinates, offset, end, stride, transform, opt_dest) {
|
||||
var m00 = goog.vec.Mat4.getElement(transform, 0, 0);
|
||||
var m10 = goog.vec.Mat4.getElement(transform, 1, 0);
|
||||
var m01 = goog.vec.Mat4.getElement(transform, 0, 1);
|
||||
@@ -46,8 +45,7 @@ ol.geom.flat.transform.transform2D =
|
||||
* @param {Array.<number>=} opt_dest Destination.
|
||||
* @return {Array.<number>} Transformed coordinates.
|
||||
*/
|
||||
ol.geom.flat.transform.translate =
|
||||
function(flatCoordinates, offset, end, stride, deltaX, deltaY, opt_dest) {
|
||||
ol.geom.flat.transform.translate = function(flatCoordinates, offset, end, stride, deltaX, deltaY, opt_dest) {
|
||||
var dest = opt_dest ? opt_dest : [];
|
||||
var i = 0;
|
||||
var j, k;
|
||||
|
||||
Reference in New Issue
Block a user