@vertexvis/geometry 0.21.0-testing.4 → 0.21.0-testing.6

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/dist/angle.d.ts CHANGED
@@ -18,9 +18,13 @@ export declare function fromPoints(a: Point.Point, b: Point.Point): Angle;
18
18
  */
19
19
  export declare function fromPointsInDegrees(a: Point.Point, b: Point.Point): Angle;
20
20
  /**
21
- * Normalizes the given angle, in degrees, to a number between 0 and 359.
21
+ * Normalizes the given angle, in degrees, to a number greater than or equal to 0 and less than 360.
22
22
  */
23
23
  export declare function normalize(degrees: Angle): Angle;
24
+ /**
25
+ * Normalizes the given angle, in radians, to a number greater than or equal to 0 and less than 2 PI.
26
+ */
27
+ export declare function normalizeRadians(radians: Angle): Angle;
24
28
  /**
25
29
  * Converts the given radians to degrees.
26
30
  */
@@ -219,11 +219,17 @@ function fromPointsInDegrees(a, b) {
219
219
  return normalize$2(toDegrees(theta) - 270);
220
220
  }
221
221
  /**
222
- * Normalizes the given angle, in degrees, to a number between 0 and 359.
222
+ * Normalizes the given angle, in degrees, to a number greater than or equal to 0 and less than 360.
223
223
  */
224
224
  function normalize$2(degrees) {
225
225
  return (degrees + 3600) % 360;
226
226
  }
227
+ /**
228
+ * Normalizes the given angle, in radians, to a number greater than or equal to 0 and less than 2 PI.
229
+ */
230
+ function normalizeRadians(radians) {
231
+ return toRadians(normalize$2(toDegrees(radians)));
232
+ }
227
233
  /**
228
234
  * Converts the given radians to degrees.
229
235
  */
@@ -242,6 +248,7 @@ var angle = /*#__PURE__*/Object.freeze({
242
248
  fromPoints: fromPoints$1,
243
249
  fromPointsInDegrees: fromPointsInDegrees,
244
250
  normalize: normalize$2,
251
+ normalizeRadians: normalizeRadians,
245
252
  toDegrees: toDegrees,
246
253
  toRadians: toRadians
247
254
  });