From a00c0aab1eb5a7a55bef8ca08115bdd722ab5699 Mon Sep 17 00:00:00 2001 From: Matthew Kosarek Date: Sun, 16 May 2021 19:50:15 -0400 Subject: Moved the frontend directory up so that it no longer exists --- frontend/_shared/math/point2.js | 16 ---------------- 1 file changed, 16 deletions(-) delete mode 100644 frontend/_shared/math/point2.js (limited to 'frontend/_shared/math/point2.js') diff --git a/frontend/_shared/math/point2.js b/frontend/_shared/math/point2.js deleted file mode 100644 index eeacd91..0000000 --- a/frontend/_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 -- cgit v1.2.1