From f7e4b6e1dcd333a88fac596ed7c1a53ee1343140 Mon Sep 17 00:00:00 2001 From: Flavio Silva <55815265+201flaviosilva@users.noreply.github.com> Date: Fri, 3 Feb 2023 19:01:40 +0000 Subject: [PATCH] rename calc functions --- src/Physics/calculateAngles.js | 54 +++++++-------- src/Physics/calculateDimensions.js | 102 +++++++++++++++-------------- src/Physics/calculateDistances.js | 20 +++--- src/Physics/index.js | 12 ++-- 4 files changed, 95 insertions(+), 93 deletions(-) diff --git a/src/Physics/calculateAngles.js b/src/Physics/calculateAngles.js index 56c76dd..34f2cfb 100644 --- a/src/Physics/calculateAngles.js +++ b/src/Physics/calculateAngles.js @@ -10,13 +10,13 @@ import { radiansToDegrees } from "../Maths/radiansToDegrees.js"; * * @returns {number} The angle between the two points, in radians. * - * @example getAngleBetweenTwoPoints(0, 0, 1, 1); // output: 0.7853981633974483 (approx. 45°) - * @example getAngleBetweenTwoPoints(0, 0, 0, 1); // output: 1.5707963267948966 (approx. 90°) + * @example calcAngleBetweenTwoPoints(0, 0, 1, 1); // output: 0.7853981633974483 (approx. 45°) + * @example calcAngleBetweenTwoPoints(0, 0, 0, 1); // output: 1.5707963267948966 (approx. 90°) * * @function getAngleBetweenTwoPoints * @memberof Physics */ -export function getAngleBetweenTwoPoints(x1, y1, x2, y2) { return Math.atan2(y2 - y1, x2 - x1); } +export function calcAngleBetweenTwoPoints(x1, y1, x2, y2) { return Math.atan2(y2 - y1, x2 - x1); } /** * Calculates the angle between two points in a two-dimensional plane, given as instances of `Vector2`. @@ -34,18 +34,18 @@ export function getAngleBetweenTwoPoints(x1, y1, x2, y2) { return Math.atan2(y2 * @example * const point1 = { x: 0, y: 0 }; * const point2 = { x: 1, y: 1 }; - * getAngleBetweenTwoPointsVector2(point1, point2); // output: 0.7853981633974483 (approx. 45°) + * calcAngleBetweenTwoPointsVector2(point1, point2); // output: 0.7853981633974483 (approx. 45°) * * @example * const point1 = { x: 0, y: 0 }; * const point2 = { x: 0, y: 1 }; - * getAngleBetweenTwoPointsVector2(point1, point2); // output: 1.5707963267948966 (approx. 90°) + * calcAngleBetweenTwoPointsVector2(point1, point2); // output: 1.5707963267948966 (approx. 90°) * - * @function getAngleBetweenTwoPointsVector2 + * @function calcAngleBetweenTwoPointsVector2 * @memberof Physics */ -export function getAngleBetweenTwoPointsVector2(point1, point2) { - return getAngleBetweenTwoPoints(point1.x, point1.y, point2.x, point2.y); +export function calcAngleBetweenTwoPointsVector2(point1, point2) { + return calcAngleBetweenTwoPoints(point1.x, point1.y, point2.x, point2.y); } /** @@ -58,14 +58,14 @@ export function getAngleBetweenTwoPointsVector2(point1, point2) { * * @returns {number} The angle between the two points, in degrees. * - * @example getAngleBetweenTwoPointsDegrees(0, 0, 1, 1); // output: 45 - * @example getAngleBetweenTwoPointsDegrees(0, 0, 0, 1); // output: 90 + * @example calcAngleBetweenTwoPointsDegrees(0, 0, 1, 1); // output: 45 + * @example calcAngleBetweenTwoPointsDegrees(0, 0, 0, 1); // output: 90 * - * @function getAngleBetweenTwoPointsDegrees + * @function calcAngleBetweenTwoPointsDegrees * @memberof Physics */ -export function getAngleBetweenTwoPointsDegrees(x1, y1, x2, y2) { - return radiansToDegrees(getAngleBetweenTwoPoints(x1, y1, x2, y2)); +export function calcAngleBetweenTwoPointsDegrees(x1, y1, x2, y2) { + return radiansToDegrees(calcAngleBetweenTwoPoints(x1, y1, x2, y2)); } /** @@ -84,18 +84,18 @@ export function getAngleBetweenTwoPointsDegrees(x1, y1, x2, y2) { * @example * const point1 = { x: 0, y: 0 }; * const point2 = { x: 1, y: 1 }; - * getAngleBetweenTwoPointsVector2Degrees(point1, point2); // output: 45 + * calcAngleBetweenTwoPointsVector2Degrees(point1, point2); // output: 45 * * @example * const point1 = { x: 0, y: 0 }; * const point2 = { x: 0, y: 1 }; - * getAngleBetweenTwoPointsVector2Degrees(point1, point2); // output: 90 + * calcAngleBetweenTwoPointsVector2Degrees(point1, point2); // output: 90 * - * @function getAngleBetweenTwoPointsVector2Degrees + * @function calcAngleBetweenTwoPointsVector2Degrees * @memberof Physics */ -export function getAngleBetweenTwoPointsVector2Degrees(point1, point2) { - return getAngleBetweenTwoPointsDegrees(point1.x, point1.y, point2.x, point2.y); +export function calcAngleBetweenTwoPointsVector2Degrees(point1, point2) { + return calcAngleBetweenTwoPointsDegrees(point1.x, point1.y, point2.x, point2.y); } @@ -120,17 +120,17 @@ export function getAngleBetweenTwoPointsVector2Degrees(point1, point2) { * @example * const rect1 = { x: 0, y: 0, width: 2, height: 2 }; * const rect2 = { x: 2, y: 2, width: 2, height: 2 }; - * calculateAngleBetweenRectangles(rect1, rect2); // output: 0.7853981633974483 + * calcAngleBetweenRectangles(rect1, rect2); // output: 0.7853981633974483 * * @example * const rect1 = { x: 0, y: 0, width: 2, height: 2 }; * const rect2 = { x: 1, y: 2, width: 2, height: 2 }; - * calculateAngleBetweenRectangles(rect1, rect2); // output: 1.1071487177940904 + * calcAngleBetweenRectangles(rect1, rect2); // output: 1.1071487177940904 * - * @function calculateAngleBetweenRectangles + * @function calcAngleBetweenRectangles * @memberof Physics */ -export function calculateAngleBetweenRectangles(rect1, rect2) { +export function calcAngleBetweenRectangles(rect1, rect2) { const xOverlap = Math.min(rect1.x + rect1.width, rect2.x + rect2.width) - Math.max(rect1.x, rect2.x); const yOverlap = Math.min(rect1.y + rect1.height, rect2.y + rect2.height) - Math.max(rect1.y, rect2.y); return Math.atan2(yOverlap, xOverlap); @@ -150,14 +150,14 @@ export function calculateAngleBetweenRectangles(rect1, rect2) { * * @returns {number} The angle between the two rectangles. * - * @example calculateAngleBetweenRectanglesByCoordinates(0, 0, 10, 10, 20, 20, 20, 20); // Output: 45 - * @example calculateAngleBetweenRectanglesByCoordinates(10, 10, 10, 10, 30, 30, 20, 20); // Output: 30 + * @example calcAngleBetweenRectanglesByCoordinates(0, 0, 10, 10, 20, 20, 20, 20); // Output: 45 + * @example calcAngleBetweenRectanglesByCoordinates(10, 10, 10, 10, 30, 30, 20, 20); // Output: 30 * - * @function calculateAngleBetweenRectanglesByCoordinates + * @function calcAngleBetweenRectanglesByCoordinates * @memberof Physics */ -export function calculateAngleBetweenRectanglesByCoordinates(x1, y1, width1, height1, x2, y2, width2, height2) { - return calculateAngleBetweenRectangles( +export function calcAngleBetweenRectanglesByCoordinates(x1, y1, width1, height1, x2, y2, width2, height2) { + return calcAngleBetweenRectangles( { x: x1 + width1 / 2, y: y1 + height1 / 2, width: width1, height: height1 }, { x: x2 + width2 / 2, y: y2 + height2 / 2, width: width2, height: height2 } ); diff --git a/src/Physics/calculateDimensions.js b/src/Physics/calculateDimensions.js index 9059041..34ee929 100644 --- a/src/Physics/calculateDimensions.js +++ b/src/Physics/calculateDimensions.js @@ -5,13 +5,13 @@ * * @returns {number} The area of the circle. * - * @example calculateCircleArea(5); // Output: 78.53981633974483 - * @example calculateCircleArea(10); // Output: 314.1592653589793 + * @example calcCircleArea(5); // Output: 78.53981633974483 + * @example calcCircleArea(10); // Output: 314.1592653589793 * - * @function calculateCircleArea + * @function calcCircleArea * @memberof Physics */ -export function calculateCircleArea(radius) { return Math.PI * radius * radius; } +export function calcCircleArea(radius) { return Math.PI * radius * radius; } /** * Gets the area of a rectangle. @@ -21,13 +21,13 @@ export function calculateCircleArea(radius) { return Math.PI * radius * radius; * * @returns {number} The area of the rectangle. * - * @example calculateRectangleArea(5, 10); // Output: 50 - * @example calculateRectangleArea(10, 20); + * @example calcRectangleArea(5, 10); // Output: 50 + * @example calcRectangleArea(10, 20); * - * @function calculateRectangleArea + * @function calcRectangleArea * @memberof Physics */ -export function calculateRectangleArea(width, height) { return width * height; } +export function calcRectangleArea(width, height) { return width * height; } /** @@ -37,13 +37,13 @@ export function calculateRectangleArea(width, height) { return width * height; } * * @returns {number} The perimeter of the circle. * - * @example calculateCirclePerimeter(5); // Output: 31.41592653589793 - * @example calculateCirclePerimeter(10); // Output: 62.83185307179586 + * @example calcCirclePerimeter(5); // Output: 31.41592653589793 + * @example calcCirclePerimeter(10); // Output: 62.83185307179586 * - * @function calculateCirclePerimeter + * @function calcCirclePerimeter * @memberof Physics */ -export function calculateCirclePerimeter(radius) { return 2 * Math.PI * radius; } +export function calcCirclePerimeter(radius) { return 2 * Math.PI * radius; } /** * Gets the perimeter of a rectangle. @@ -53,13 +53,13 @@ export function calculateCirclePerimeter(radius) { return 2 * Math.PI * radius; * * @returns {number} The perimeter of the rectangle. * - * @example calculateRectanglePerimeterByDimensions(5, 10); // Output: 30 - * @example calculateRectanglePerimeterByDimensions(10, 20); // Output: 60 + * @example calcRectanglePerimeterByDimensions(5, 10); // Output: 30 + * @example calcRectanglePerimeterByDimensions(10, 20); // Output: 60 * - * @function calculateRectanglePerimeterByDimensions + * @function calcRectanglePerimeterByDimensions * @memberof Physics */ -export function calculateRectanglePerimeterByDimensions(width, height) { return 2 * (width + height); } +export function calcRectanglePerimeterByDimensions(width, height) { return 2 * (width + height); } /** * Gets the perimeter of a rectangle defined by its bounds. @@ -74,17 +74,17 @@ export function calculateRectanglePerimeterByDimensions(width, height) { return * * @example * const rectangle = { x: 0, y: 0, width: 5, height: 10 }; - * calculateRectanglePerimeter(rectangle); // Output: 30 + * calcRectanglePerimeter(rectangle); // Output: 30 * * @example * const rectangle = { x: 10, y: 20, width: 10, height: 20 }; - * calculateRectanglePerimeter(rectangle); // Output: 60 + * calcRectanglePerimeter(rectangle); // Output: 60 * - * @function calculateRectanglePerimeter + * @function calcRectanglePerimeter * @memberof Physics */ -export function calculateRectanglePerimeter(rectangle) { - return calculateRectanglePerimeterByDimensions(rectangle.x, rectangle.y, rectangle.width, rectangle.height); +export function calcRectanglePerimeter(rectangle) { + return calcRectanglePerimeterByDimensions(rectangle.x, rectangle.y, rectangle.width, rectangle.height); } @@ -96,12 +96,12 @@ export function calculateRectanglePerimeter(rectangle) { * * @returns {number} The center x-coordinate of the rectangle * - * @example getRectangleCenterX(10, 20); // returns 15 + * @example calcRectangleCenterX(10, 20); // returns 15 * - * @function getRectangleCenterX + * @function calcRectangleCenterX * @memberof Physics */ -export function getRectangleCenterX(x, width) { return x + width / 2; } +export function calcRectangleCenterX(x, width) { return x + width / 2; } /** * Calculates the center y-coordinate of a rectangle given its y-coordinate and height. @@ -111,12 +111,12 @@ export function getRectangleCenterX(x, width) { return x + width / 2; } * * @returns {number} The center y-coordinate of the rectangle * - * @example getRectangleCenterY(10, 20); // returns 15 + * @example calcRectangleCenterY(10, 20); // returns 15 * - * @function getRectangleCenterY + * @function calcRectangleCenterY * @memberof Physics */ -export function getRectangleCenterY(y, height) { return y + height / 2; } +export function calcRectangleCenterY(y, height) { return y + height / 2; } /** * Calculates the center coordinates of a rectangle given its x-coordinate, y-coordinate, width, and height. @@ -128,12 +128,12 @@ export function getRectangleCenterY(y, height) { return y + height / 2; } * * @returns {object} An object with x and y properties representing the center coordinates of the rectangle * - * @example getRectangleCenter(10, 10, 20, 20); // returns { x: 15, y: 15 } + * @example calcRectangleCenter(10, 10, 20, 20); // returns { x: 15, y: 15 } * - * @function getRectangleCenter + * @function calcRectangleCenter * @memberof Physics */ -export function getRectangleCenter(x, y, width, height) { return { x: getRectangleCenterX(x, width), y: getRectangleCenterY(y, height) }; } +export function calcRectangleCenter(x, y, width, height) { return { x: calcRectangleCenterX(x, width), y: calcRectangleCenterY(y, height) }; } /** * Calculates the center x-coordinate of a rectangle given its bounds. @@ -142,12 +142,12 @@ export function getRectangleCenter(x, y, width, height) { return { x: getRectang * * @returns {number} The center x-coordinate of the rectangle * - * @example getRectangleCenterXFromBounds({ x: 10, y: 10, width: 20, height: 20 }); // returns 15 + * @example calcRectangleCenterXFromBounds({ x: 10, y: 10, width: 20, height: 20 }); // returns 15 * - * @function getRectangleCenterXFromBounds + * @function calcRectangleCenterXFromBounds * @memberof Physics */ -export function getRectangleCenterXFromBounds(rectangle) { return getRectangleCenterX(rectangle.x, rectangle.width); } +export function calcRectangleCenterXFromBounds(rectangle) { return calcRectangleCenterX(rectangle.x, rectangle.width); } /** * Calculates the center y-coordinate of a rectangle given its bounds. @@ -156,12 +156,12 @@ export function getRectangleCenterXFromBounds(rectangle) { return getRectangleCe * * @returns {number} The center y-coordinate of the rectangle * - * @example getRectangleCenterYFromBounds({ x: 10, y: 10, width: 20, height: 20 }); // returns 15 + * @example calcRectangleCenterYFromBounds({ x: 10, y: 10, width: 20, height: 20 }); // returns 15 * - * @function getRectangleCenterYFromBounds + * @function calcRectangleCenterYFromBounds * @memberof Physics */ -export function getRectangleCenterYFromBounds(rectangle) { return getRectangleCenterY(rectangle.y, rectangle.height); } +export function calcRectangleCenterYFromBounds(rectangle) { return calcRectangleCenterY(rectangle.y, rectangle.height); } /** * Returns the Y-coordinate of the center of a rectangle, given the rectangle's bounds. @@ -170,13 +170,13 @@ export function getRectangleCenterYFromBounds(rectangle) { return getRectangleCe * @returns {number} The Y-coordinate of the center of the rectangle. * * @example - * getRectangleCenterYFromBounds({ x: 10, y: 10, y: 10, height: 20 }); // 20 + * calcRectangleCenterYFromBounds({ x: 10, y: 10, y: 10, height: 20 }); // 20 * - * @function getRectangleCenterYFromBounds + * @function calcRectangleCenterYFromBounds * @memberof Physics */ -export function getRectangleCenterYFromBounds(rectangle) { - return getRectangleCenterY(rectangle.y, rectangle.height); +export function calcRectangleCenterYFromBounds(rectangle) { + return calcRectangleCenterY(rectangle.y, rectangle.height); } /** @@ -187,13 +187,13 @@ export function getRectangleCenterYFromBounds(rectangle) { * * @example * const rect = { x: 10, y: 10, width: 20, height: 20 }; - * getRectangleCenterFromBounds(rect); // { x: 20, y: 20 } + * calcRectangleCenterFromBounds(rect); // { x: 20, y: 20 } * - * @function getRectangleCenterFromBounds + * @function calcRectangleCenterFromBounds * @memberof Physics */ -export function getRectangleCenterFromBounds(rectangle) { - return getRectangleCenter(rectangle.x, rectangle.y, rectangle.width, rectangle.height); +export function calcRectangleCenterFromBounds(rectangle) { + return calcRectangleCenter(rectangle.x, rectangle.y, rectangle.width, rectangle.height); } /** @@ -206,12 +206,12 @@ export function getRectangleCenterFromBounds(rectangle) { * * @returns {Array} An array of objects that represent the vertices of the rectangle, where each object has properties 'x' and 'y'. * - * @example getRectangleVertices(0, 0, 2, 3); // [{x: 0, y: 0}, {x: 2, y: 0}, {x: 2, y: 3}, {x: 0, y: 3}] + * @example calcRectangleVertices(0, 0, 2, 3); // [{x: 0, y: 0}, {x: 2, y: 0}, {x: 2, y: 3}, {x: 0, y: 3}] * - * @function getRectangleVertices + * @function calcRectangleVertices * @memberof Physics */ -export function getRectangleVertices(x, y, width, height) { +export function calcRectangleVertices(x, y, width, height) { return [ { x: x, y: y }, { x: x + width, y: y }, @@ -227,9 +227,11 @@ export function getRectangleVertices(x, y, width, height) { * * @returns {Array} An array of objects that represent the vertices of the rectangle, where each object has properties 'x' and 'y'. * - * @example getVerticesFromRectangleBounds({ x: 0, y: 0, width: 2, height: 3 }); // [{x: 0, y: 0}, {x: 2, y: 0}, {x: 2, y: 3}, {x: 0, y: 3}] + * @example calcVerticesFromRectangleBounds({ x: 0, y: 0, width: 2, height: 3 }); // [{x: 0, y: 0}, {x: 2, y: 0}, {x: 2, y: 3}, {x: 0, y: 3}] * - * @function getVerticesFromRectangleBounds + * @function calcVerticesFromRectangleBounds * @memberof Physics */ -export function getVerticesFromRectangleBounds(rectangle) { return getRectangleVertices(rectangle.x, rectangle.y, rectangle.width, rectangle.height); } +export function calcVerticesFromRectangleBounds(rectangle) { + return calcRectangleVertices(rectangle.x, rectangle.y, rectangle.width, rectangle.height); +} diff --git a/src/Physics/calculateDistances.js b/src/Physics/calculateDistances.js index 84782bf..35a75ee 100644 --- a/src/Physics/calculateDistances.js +++ b/src/Physics/calculateDistances.js @@ -10,7 +10,7 @@ * * @returns {number} The distance between two points. */ -export function calculateDistanceBetweenTwoPoints(x1, y1, x2, y2) { +export function calcDistanceBetweenTwoPoints(x1, y1, x2, y2) { return Math.sqrt((x1 - x2) * (x1 - x2) + (y1 - y2) * (y1 - y2)); } @@ -24,8 +24,8 @@ export function calculateDistanceBetweenTwoPoints(x1, y1, x2, y2) { * * @returns {number} The distance between two points. */ -export function calculateDistanceBetweenTwoPointObjects(point1, point2) { - return calculateDistanceBetweenTwoPoints(point1.x, point1.y, point2.x, point2.y); +export function calcDistanceBetweenTwoPointObjects(point1, point2) { + return calcDistanceBetweenTwoPoints(point1.x, point1.y, point2.x, point2.y); } @@ -57,8 +57,8 @@ export function calculateDistanceBetweenTwoPointObjects(point1, point2) { * @function calculateDistanceBetweenCircles * @memberof Physics */ -export function calculateDistanceBetweenCircles(circle1, circle2) { - return calculateDistanceBetweenTwoPoints(circle1.x, circle1.y, circle2.x, circle2.y) - (circle1.radius + circle2.radius); +export function calcDistanceBetweenCircles(circle1, circle2) { + return calcDistanceBetweenTwoPoints(circle1.x, circle1.y, circle2.x, circle2.y) - (circle1.radius + circle2.radius); } /** @@ -80,8 +80,8 @@ export function calculateDistanceBetweenCircles(circle1, circle2) { * @function calculateDistanceBetweenCirclesByCoordinates * @memberof Physics */ -export function calculateDistanceBetweenCirclesByCoordinates(x1, y1, radius1, x2, y2, radius2) { - return calculateDistanceBetweenCircles( +export function calcDistanceBetweenCirclesByCoordinates(x1, y1, radius1, x2, y2, radius2) { + return calcDistanceBetweenCircles( { x: x1, y: y1, radius: radius1 }, { x: x2, y: y2, radius: radius2 } ); @@ -110,7 +110,7 @@ export function calculateDistanceBetweenCirclesByCoordinates(x1, y1, radius1, x2 * @function calculateOverlapBetweenRectangles * @memberof Physics */ -export function calculateOverlapBetweenRectangles(rect1, rect2) { +export function calcOverlapBetweenRectangles(rect1, rect2) { const xOverlap = Math.min(rect1.x + rect1.width, rect2.x + rect2.width) - Math.max(rect1.x, rect2.x); const yOverlap = Math.min(rect1.y + rect1.height, rect2.y + rect2.height) - Math.max(rect1.y, rect2.y); return xOverlap * yOverlap; @@ -134,8 +134,8 @@ export function calculateOverlapBetweenRectangles(rect1, rect2) { * @function calculateOverlapBetweenRectanglesByCoordinates * @memberof Physics */ -export function calculateOverlapBetweenRectanglesByCoordinates(x1, y1, width1, height1, x2, y2, width2, height2) { - return calculateOverlapBetweenRectangles( +export function calcOverlapBetweenRectanglesByCoordinates(x1, y1, width1, height1, x2, y2, width2, height2) { + return calcOverlapBetweenRectangles( { x: x1 + width1 / 2, y: y1 + height1 / 2, width: width1, height: height1 }, { x: x2 + width2 / 2, y: y2 + height2 / 2, width: width2, height: height2 } ); diff --git a/src/Physics/index.js b/src/Physics/index.js index ba6fdce..ccdba3d 100644 --- a/src/Physics/index.js +++ b/src/Physics/index.js @@ -1,6 +1,6 @@ -import { calculateAngleBetweenRectangles, calculateAngleBetweenRectanglesByCoordinates, getAngleBetweenTwoPoints, getAngleBetweenTwoPointsDegrees, getAngleBetweenTwoPointsVector2, getAngleBetweenTwoPointsVector2Degrees } from "./calculateAngles.js"; -import { calculateCircleArea, calculateCirclePerimeter, calculateRectangleArea, calculateRectanglePerimeter, calculateRectanglePerimeterByDimensions, getRectangleCenter, getRectangleCenterFromBounds, getRectangleCenterX, getRectangleCenterXFromBounds, getRectangleCenterY, getRectangleCenterYFromBounds, getRectangleVertices, getVerticesFromRectangleBounds } from "./calculateDimensions.js"; -import { calculateDistanceBetweenCircles, calculateDistanceBetweenCirclesByCoordinates, calculateDistanceBetweenTwoPointObjects, calculateDistanceBetweenTwoPoints, calculateOverlapBetweenRectangles, calculateOverlapBetweenRectanglesByCoordinates } from "./calculateDistances.js"; +import { calcAngleBetweenRectangles, calcAngleBetweenRectanglesByCoordinates, calcAngleBetweenTwoPoints, calcAngleBetweenTwoPointsDegrees, calcAngleBetweenTwoPointsVector2, calcAngleBetweenTwoPointsVector2Degrees } from "./calculateAngles.js"; +import { calcCircleArea, calcCirclePerimeter, calcRectangleArea, calcRectangleCenter, calcRectangleCenterFromBounds, calcRectangleCenterX, calcRectangleCenterXFromBounds, calcRectangleCenterY, calcRectangleCenterYFromBounds, calcRectanglePerimeter, calcRectanglePerimeterByDimensions, calcRectangleVertices, calcVerticesFromRectangleBounds } from "./calculateDimensions.js"; +import { calcDistanceBetweenCircles, calcDistanceBetweenCirclesByCoordinates, calcDistanceBetweenTwoPointObjects, calcDistanceBetweenTwoPoints, calcOverlapBetweenRectangles, calcOverlapBetweenRectanglesByCoordinates } from "./calculateDistances.js"; import { topDownCarMovimentation } from "./topDownCarMovimentation.js"; @@ -10,11 +10,11 @@ import { topDownCarMovimentation } from "./topDownCarMovimentation.js"; * @namespace Physics */ export { - calculateAngleBetweenRectangles, calculateAngleBetweenRectanglesByCoordinates, getAngleBetweenTwoPoints, getAngleBetweenTwoPointsDegrees, getAngleBetweenTwoPointsVector2, getAngleBetweenTwoPointsVector2Degrees, + calcAngleBetweenRectangles, calcAngleBetweenRectanglesByCoordinates, calcAngleBetweenTwoPoints, calcAngleBetweenTwoPointsDegrees, calcAngleBetweenTwoPointsVector2, calcAngleBetweenTwoPointsVector2Degrees, - calculateCircleArea, calculateCirclePerimeter, calculateRectangleArea, calculateRectanglePerimeter, calculateRectanglePerimeterByDimensions, getRectangleCenter, getRectangleCenterFromBounds, getRectangleCenterX, getRectangleCenterXFromBounds, getRectangleCenterY, getRectangleCenterYFromBounds, getRectangleVertices, getVerticesFromRectangleBounds, + calcCircleArea, calcCirclePerimeter, calcRectangleArea, calcRectanglePerimeter, calcRectanglePerimeterByDimensions, calcRectangleCenter, calcRectangleCenterFromBounds, calcRectangleCenterX, calcRectangleCenterXFromBounds, calcRectangleCenterY, calcRectangleCenterYFromBounds, calcRectangleVertices, calcVerticesFromRectangleBounds, - calculateDistanceBetweenCircles, calculateDistanceBetweenCirclesByCoordinates, calculateDistanceBetweenTwoPointObjects, calculateDistanceBetweenTwoPoints, calculateOverlapBetweenRectangles, calculateOverlapBetweenRectanglesByCoordinates, + calcDistanceBetweenCircles, calcDistanceBetweenCirclesByCoordinates, calcDistanceBetweenTwoPointObjects, calcDistanceBetweenTwoPoints, calcOverlapBetweenRectangles, calcOverlapBetweenRectanglesByCoordinates, topDownCarMovimentation, };