@casual-simulation/aux-runtime 4.1.4 → 4.1.5

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@casual-simulation/aux-runtime",
3
- "version": "4.1.4",
3
+ "version": "4.1.5",
4
4
  "description": "Runtime for AUX projects",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",
@@ -26,7 +26,7 @@
26
26
  },
27
27
  "dependencies": {
28
28
  "@casual-simulation/aux-common": "^4.1.4",
29
- "@casual-simulation/aux-records": "^4.1.4",
29
+ "@casual-simulation/aux-records": "^4.1.5",
30
30
  "@casual-simulation/crypto": "^4.0.5",
31
31
  "@casual-simulation/engine262": "0.0.1-4de2170374e22761996e46eb1362f4496ee57f8f",
32
32
  "@casual-simulation/error-stack-parser": "^2.0.7",
@@ -7959,6 +7959,18 @@ declare class Vector2 {
7959
7959
  * Normalizing a vector preserves its directionality while making the length (i.e. scale) of it 1.
7960
7960
  */
7961
7961
  normalize(): Vector2;
7962
+
7963
+ /**
7964
+ * Negates each component of this vector and returns a new vector that contains the result.
7965
+ *
7966
+ * @example Negate a vector.
7967
+ * const myVector = new Vector2(1, 2);
7968
+ * const negated = myVector.negate();
7969
+ *
7970
+ * os.toast(`Vector: ${myVector}, Negated: ${negated}`);
7971
+ */
7972
+ negate(): Vector2;
7973
+
7962
7974
  toString(): string;
7963
7975
  /**
7964
7976
  * Determines if this vector equals the other vector.
@@ -8085,6 +8097,18 @@ declare class Vector3 {
8085
8097
  * A normalized vector is a vector whose length equals 1.
8086
8098
  */
8087
8099
  normalize(): Vector3;
8100
+
8101
+ /**
8102
+ * Negates each component of this vector and returns a new vector that contains the result.
8103
+ *
8104
+ * @example Negate a vector.
8105
+ * const myVector = new Vector3(1, 2, 3);
8106
+ * const negated = myVector.negate();
8107
+ *
8108
+ * os.toast(`Vector: ${myVector}, Negated: ${negated}`);
8109
+ */
8110
+ negate(): Vector3;
8111
+
8088
8112
  toString(): string;
8089
8113
  /**
8090
8114
  * Determines if this vector equals the other vector.
@@ -18095,6 +18119,36 @@ interface Math {
18095
18119
  */
18096
18120
  getForwardDirection(pointerRotation: RawRotation | Rotation): Vector3;
18097
18121
 
18122
+ /**
18123
+ * Converts the given number of [degrees](https://en.wikipedia.org/wiki/Degree_(angle)) to [radians](https://en.wikipedia.org/wiki/Radian) and returns the result.
18124
+ *
18125
+ * This operation is equivalent to `radians = degrees * (Math.PI / 180)`.
18126
+ *
18127
+ * @param degrees the number of degrees that should be converted to radians.
18128
+ *
18129
+ * @example Get the number of radians for a 90 degree angle
18130
+ * const radians = math.degreesToRadians(90);
18131
+ *
18132
+ * @dochash actions/math
18133
+ * @docname math.degreesToRadians
18134
+ */
18135
+ degreesToRadians(degrees: number): number;
18136
+
18137
+ /**
18138
+ * Converts the given number of [radians](https://en.wikipedia.org/wiki/Radian) to [degrees](https://en.wikipedia.org/wiki/Degree_(angle)) and returns the result.
18139
+ *
18140
+ * This operation is equivalent to `degrees = radians * (180 / Math.PI)`.
18141
+ *
18142
+ * @param radians the number of radians that should be converted to degrees.
18143
+ *
18144
+ * @example Get the number of degrees for a Math.PI / 2 angle
18145
+ * const degrees = math.radiansToDegrees(Math.PI / 2);
18146
+ *
18147
+ * @dochash actions/math
18148
+ * @docname math.radiansToDegrees
18149
+ */
18150
+ radiansToDegrees(radians: number): number;
18151
+
18098
18152
  /**
18099
18153
  * Finds the point at which the the given ray and ground plane intersect.
18100
18154
  * Returns null if the ray does not intersect the ground plane.