@lijuhong1981/jsmath 1.1.11 → 1.2.1

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/index.js CHANGED
@@ -33,9 +33,8 @@ import {
33
33
  EPSILON20,
34
34
  EPSILON21,
35
35
  } from "./src/Constant.js";
36
- import generateUUID from "./src/generateUUID.js";
37
- import degToRad from "./src/degToRad.js";
38
- import radToDeg from "./src/radToDeg.js";
36
+ import degreesToRadians from "./src/degreesToRadians.js";
37
+ import radiansToDegrees from "./src/radiansToDegrees.js";
39
38
  import clamp from "./src/clamp.js";
40
39
  import clampLatitude from "./src/clampLatitude.js";
41
40
  import clampLongitude from "./src/clampLongitude.js";
@@ -93,10 +92,8 @@ export {
93
92
  EPSILON19,
94
93
  EPSILON20,
95
94
  EPSILON21,
96
- generateUUID,
97
- generateUUID as createUUID,
98
- degToRad,
99
- radToDeg,
95
+ degreesToRadians,
96
+ radiansToDegrees,
100
97
  clamp,
101
98
  clampLatitude,
102
99
  clampLongitude,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lijuhong1981/jsmath",
3
- "version": "1.1.11",
3
+ "version": "1.2.1",
4
4
  "description": "> TODO: description",
5
5
  "author": "lijuhong1981",
6
6
  "homepage": "https://github.com/lijuhong1981/jslibs#readme",
@@ -18,5 +18,5 @@
18
18
  "bugs": {
19
19
  "url": "https://github.com/lijuhong1981/jslibs/issues"
20
20
  },
21
- "gitHead": "fde69a7f1188bc71f49cd03831c4265de45f8394"
21
+ "gitHead": "cfd2fd5abb2b92181343090dfd26818e7aa94078"
22
22
  }
@@ -5,8 +5,8 @@ import { RADIANS_PER_DEGREE } from "./Constant.js";
5
5
  * @param {Number} degrees 角度
6
6
  * @returns {Number} 弧度
7
7
  */
8
- function degToRad(degrees) {
8
+ function degreesToRadians(degrees) {
9
9
  return degrees * RADIANS_PER_DEGREE;
10
10
  };
11
11
 
12
- export default degToRad;
12
+ export default degreesToRadians;
@@ -5,8 +5,8 @@ import { DEGREES_PER_RADIAN } from "./Constant.js";
5
5
  * @param {Number} radians 弧度
6
6
  * @returns {Number} 角度
7
7
  */
8
- function radToDeg(radians) {
8
+ function radiansToDegrees(radians) {
9
9
  return radians * DEGREES_PER_RADIAN;
10
10
  }
11
11
 
12
- export default radToDeg;
12
+ export default radiansToDegrees;
@@ -1,19 +0,0 @@
1
- /**
2
- * Creates a Universally Unique IDentifier (UUID) string. A UUID is 128 bits long, and can guarantee uniqueness across space and time.
3
- *
4
- * @function
5
- *
6
- * @returns {String}
7
- *
8
- * @see {@link http://www.ietf.org/rfc/rfc4122.txt RFC 4122 A Universally Unique IDentifier (UUID) URN Namespace}
9
- */
10
- function generateUUID() {
11
- // http://stackoverflow.com/questions/105034/how-to-create-a-guid-uuid-in-javascript
12
- return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function (c) {
13
- const r = (Math.random() * 16) | 0;
14
- const v = c === "x" ? r : (r & 0x3) | 0x8;
15
- return v.toString(16);
16
- });
17
- }
18
-
19
- export default generateUUID;