aboutsummaryrefslogtreecommitdiffstats
path: root/extlib/leaflet/src/geometry/Point.js
diff options
context:
space:
mode:
authorChristopher Allan Webber <cwebber@dustycloud.org>2015-02-14 13:34:41 -0600
committerChristopher Allan Webber <cwebber@dustycloud.org>2015-02-17 15:48:28 -0600
commit9252fc84840220106e696cc2116e7804c9529c5a (patch)
treec1bafe27ad0cac8e4b49bd476ad2e3947fe4fca9 /extlib/leaflet/src/geometry/Point.js
parent572106e23037997db9a4e131029b0a4f7cb969b5 (diff)
downloadmediagoblin-9252fc84840220106e696cc2116e7804c9529c5a.tar.lz
mediagoblin-9252fc84840220106e696cc2116e7804c9529c5a.tar.xz
mediagoblin-9252fc84840220106e696cc2116e7804c9529c5a.zip
Remove extlib deps moved into bower
Diffstat (limited to 'extlib/leaflet/src/geometry/Point.js')
-rw-r--r--extlib/leaflet/src/geometry/Point.js66
1 files changed, 0 insertions, 66 deletions
diff --git a/extlib/leaflet/src/geometry/Point.js b/extlib/leaflet/src/geometry/Point.js
deleted file mode 100644
index d031ffe1..00000000
--- a/extlib/leaflet/src/geometry/Point.js
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- * L.Point represents a point with x and y coordinates.
- */
-
-L.Point = function(/*Number*/ x, /*Number*/ y, /*Boolean*/ round) {
- this.x = (round ? Math.round(x) : x);
- this.y = (round ? Math.round(y) : y);
-};
-
-L.Point.prototype = {
- add: function(point) {
- return this.clone()._add(point);
- },
-
- _add: function(point) {
- this.x += point.x;
- this.y += point.y;
- return this;
- },
-
- subtract: function(point) {
- return this.clone()._subtract(point);
- },
-
- // destructive subtract (faster)
- _subtract: function(point) {
- this.x -= point.x;
- this.y -= point.y;
- return this;
- },
-
- divideBy: function(num, round) {
- return new L.Point(this.x/num, this.y/num, round);
- },
-
- multiplyBy: function(num) {
- return new L.Point(this.x * num, this.y * num);
- },
-
- distanceTo: function(point) {
- var x = point.x - this.x,
- y = point.y - this.y;
- return Math.sqrt(x*x + y*y);
- },
-
- round: function() {
- return this.clone()._round();
- },
-
- // destructive round
- _round: function() {
- this.x = Math.round(this.x);
- this.y = Math.round(this.y);
- return this;
- },
-
- clone: function() {
- return new L.Point(this.x, this.y);
- },
-
- toString: function() {
- return 'Point(' +
- L.Util.formatNum(this.x) + ', ' +
- L.Util.formatNum(this.y) + ')';
- }
-}; \ No newline at end of file