summaryrefslogtreecommitdiff
path: root/_shared/math/point2.js
diff options
context:
space:
mode:
authorMatthew Kosarek <mattkae@protonmail.com>2021-05-25 20:58:53 -0400
committerMatthew Kosarek <mattkae@protonmail.com>2021-05-25 20:58:53 -0400
commit76b6fa0ce8cfaaab8e2052bdd43266ded8e404b6 (patch)
tree245508c6121a0b9327d216ba3593a847972f08c1 /_shared/math/point2.js
parentc3cad9328cff7bfee8d9d824a2098f1b019e884a (diff)
Finally able to remove all of those unneeded javascript files
Diffstat (limited to '_shared/math/point2.js')
-rw-r--r--_shared/math/point2.js16
1 files changed, 0 insertions, 16 deletions
diff --git a/_shared/math/point2.js b/_shared/math/point2.js
deleted file mode 100644
index eeacd91..0000000
--- a/_shared/math/point2.js
+++ /dev/null
@@ -1,16 +0,0 @@
-function point2(x = 0, y = 0) {
- return { x: x, y: y };
-}
-
-function distanceFromPoint2ToLine2(pPoint, pLine) {
- // Check out this wikapedia article for more information:
- // https://en.wikipedia.org/wiki/Distance_from_a_point_to_a_line
- var x0 = pPoint.x,
- y0 = pPoint.y,
- x1 = pLine.start.x,
- y1 = pLine.start.y,
- x2 = pLine.end.x,
- y2 = pLine.end.y;
-
- return Math.abs((x2 - x1) * (y1 - y0) - (x1 - x0) * (y2 - y1)) / Math.sqrt(Math.pow(x2 - x1, 2) + Math.pow(y2 - y1, 2));
-} \ No newline at end of file