tpmkms_4wp 9.6.0-beta.1 → 9.6.0-beta.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,39 @@
1
+ /**
2
+ * Converts cartesian coordinates of point P relative to origin O
3
+ * into polar coordinates { radius, angle }.
4
+ * Angle is in radians, measured counterclockwise from positive x-axis.
5
+ *
6
+ * @param {Object} O - Origin point {x, y}
7
+ * @param {Object} P - Point to convert {x, y}
8
+ * @returns {Object} Polar coordinates { radius, angle } (angle in radians)
9
+ */
10
+ function cartesianToPolar(O, P) {
11
+ // Calculate differences (vector from O to P)
12
+ const dx = P.x - O.x;
13
+ const dy = P.y - O.y;
14
+
15
+ // Radius (distance from origin)
16
+ const radius = Math.hypot(dx, dy);
17
+
18
+ // Angle in radians (-π to π)
19
+ const angle = Math.atan2(dy, dx);
20
+
21
+ return {
22
+ radius,
23
+ angle
24
+ };
25
+ }
26
+
27
+ function degreesToRadians(degrees) {
28
+ return degrees * (Math.PI / 180);
29
+ }
30
+
31
+ function radiansToDegrees(radians) {
32
+ return (radians * 180) / Math.PI;
33
+ }
34
+
35
+ module.exports = {
36
+ cartesianToPolar,
37
+ degreesToRadians,
38
+ radiansToDegrees,
39
+ }
package/package.json CHANGED
@@ -234,6 +234,7 @@
234
234
  "common/helpers/conjunction.js",
235
235
  "common/helpers/dateTimeSelectors.js",
236
236
  "common/helpers/dialogues.js",
237
+ "common/helpers/drone.js",
237
238
  "common/helpers/formulas.js",
238
239
  "common/helpers/frankenhash.js",
239
240
  "common/helpers/menus.js",
@@ -371,8 +372,8 @@
371
372
  "scriptjs": "^2.5.9",
372
373
  "table": "^6.7.1",
373
374
  "uuid": "^9.0.0",
374
- "theprogrammablemind_4wp": "9.6.0-beta.1"
375
+ "theprogrammablemind_4wp": "9.6.0-beta.2"
375
376
  },
376
- "version": "9.6.0-beta.1",
377
+ "version": "9.6.0-beta.2",
377
378
  "license": "UNLICENSED"
378
379
  }