@vertexvis/geometry 0.24.3-testing.1 → 0.24.3

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.
@@ -835,12 +835,12 @@ var matrix4 = /*#__PURE__*/Object.freeze({
835
835
  });
836
836
 
837
837
  /**
838
- * Creates a new euler angle where each axis of rotation is defined by an angle,
838
+ * Creates a new set of Euler angles where each axis of rotation is defined by an angle,
839
839
  * in radians. If no value is given, then `{x: 0, y: 0, z: 0, order: 'xyz'}` is
840
840
  * returned.
841
841
  *
842
- * @param value The values to populate the euler angle with.
843
- * @returns A euler angle.
842
+ * @param value The values to populate the Euler angles with.
843
+ * @returns A set of Euler angles.
844
844
  */
845
845
  function create$c(value) {
846
846
  var _a, _b, _c, _d;
@@ -853,12 +853,12 @@ function create$c(value) {
853
853
  };
854
854
  }
855
855
  /**
856
- * Creates a new euler angle where each axis of rotation is defined by an angle,
856
+ * Creates a new set of Euler angles where each axis of rotation is defined by an angle,
857
857
  * in degrees. If no value is given, then `{x: 0, y: 0, z: 0, order: 'xyz'}` is
858
858
  * returned.
859
859
  *
860
- * @param value The values to populate the euler angle with.
861
- * @returns A euler angle.
860
+ * @param value The values to populate the Euler angles with.
861
+ * @returns A set of Euler angles.
862
862
  */
863
863
  function fromDegrees(value) {
864
864
  if (value === void 0) { value = {}; }
@@ -871,9 +871,13 @@ function fromDegrees(value) {
871
871
  });
872
872
  }
873
873
  /**
874
- * Creates a euler angle from the rotation components of a 4x4 matrix. The
874
+ * Creates a set of Euler angles from the rotation components of a 4x4 matrix. The
875
875
  * rotation components are represented by the upper 3x3 of the matrix.
876
876
  *
877
+ * Note that there are two solutions for the Euler angle of the 2nd applied
878
+ * rotation (i.e. y for xyz) because sin(theta) = sin(PI-theta).
879
+ * The returned angle will always be the solution between -PI/2 and PI/2.
880
+ *
877
881
  * @param matrix A pure rotation matrix, unscaled.
878
882
  * @param order The order that the rotations are applied.
879
883
  */
@@ -950,12 +954,12 @@ function fromRotationMatrix(matrix, order) {
950
954
  return { x: x, y: y, z: z, order: order };
951
955
  }
952
956
  /**
953
- * Returns a euler angle that was decoded from a JSON string. Supports either
957
+ * Returns a set of Euler angles that was decoded from a JSON string. Supports either
954
958
  * extracting values from an array `[x, y, z, order]` or object `{x, y, z,
955
959
  * order}`.
956
960
  *
957
961
  * @param json A JSON object.
958
- * @returns A euler angle.
962
+ * @returns A set of Euler angles.
959
963
  */
960
964
  function fromJson$4(json) {
961
965
  var obj = JSON.parse(json);
@@ -969,7 +973,7 @@ function fromJson$4(json) {
969
973
  }
970
974
  }
971
975
  /**
972
- * Type guard that checks if the given type is a Euler.
976
+ * Type guard that checks if the given type is a set of Euler angles.
973
977
  */
974
978
  function isType$1(obj) {
975
979
  // eslint-disable-next-line @typescript-eslint/no-explicit-any