dgeoutils 2.2.0 → 2.2.4
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/DCircle.d.ts +25 -1
- package/dist/DCircle.js +29 -5
- package/dist/DLine.d.ts +10 -2
- package/dist/DLine.js +32 -8
- package/dist/DPoint.d.ts +129 -12
- package/dist/DPoint.js +46 -22
- package/dist/DPolygon.d.ts +26 -32
- package/dist/DPolygon.js +114 -144
- package/dist/DPolygonLoop.d.ts +84 -6
- package/dist/DPolygonLoop.js +9 -3
- package/dist/TraceMatrix.js +7 -9
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/utils.d.ts +1 -0
- package/dist/utils.js +4 -2
- package/package.json +1 -1
package/dist/utils.d.ts
CHANGED
package/dist/utils.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.checkFunction = exports.warn = void 0;
|
|
3
|
+
exports.createArray = exports.checkFunction = exports.warn = void 0;
|
|
4
4
|
const index_1 = require("./index");
|
|
5
5
|
const DPoint_1 = require("./DPoint");
|
|
6
6
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
@@ -21,7 +21,7 @@ const shouldBeInt = (scope, funcName, argName) => (p) => {
|
|
|
21
21
|
};
|
|
22
22
|
const shouldBeUInt = (scope, funcName, argName) => (p) => {
|
|
23
23
|
if (!p.clone().round()
|
|
24
|
-
.equal(p) || !p.gtOrEqual(DPoint_1.DPoint.
|
|
24
|
+
.equal(p) || !p.gtOrEqual(DPoint_1.DPoint.zero())) {
|
|
25
25
|
(0, exports.warn)(`"${funcName}" -> "${argName}" should be UInt!`);
|
|
26
26
|
}
|
|
27
27
|
return scope;
|
|
@@ -66,3 +66,5 @@ const checkFunction = (funcName) => ({
|
|
|
66
66
|
}
|
|
67
67
|
});
|
|
68
68
|
exports.checkFunction = checkFunction;
|
|
69
|
+
const createArray = (v) => new Array(v).fill(0);
|
|
70
|
+
exports.createArray = createArray;
|