@futdevpro/fsm-dynamo 1.14.10 → 1.14.11
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/build/_collections/constants/data-sizes.const.d.ts +3 -3
- package/build/_collections/constants/data-sizes.const.d.ts.map +1 -1
- package/build/_collections/constants/data-sizes.const.js +4 -3
- package/build/_collections/constants/data-sizes.const.js.map +1 -1
- package/build/_collections/utils/array.util.d.ts +189 -0
- package/build/_collections/utils/array.util.d.ts.map +1 -1
- package/build/_collections/utils/array.util.js +189 -0
- package/build/_collections/utils/array.util.js.map +1 -1
- package/build/_collections/utils/async.util.d.ts +29 -0
- package/build/_collections/utils/async.util.d.ts.map +1 -1
- package/build/_collections/utils/async.util.js +40 -0
- package/build/_collections/utils/async.util.js.map +1 -1
- package/build/_collections/utils/json-error-helper.util.d.ts +38 -0
- package/build/_collections/utils/json-error-helper.util.d.ts.map +1 -1
- package/build/_collections/utils/json-error-helper.util.js +38 -0
- package/build/_collections/utils/json-error-helper.util.js.map +1 -1
- package/build/_collections/utils/log.util.d.ts +195 -5
- package/build/_collections/utils/log.util.d.ts.map +1 -1
- package/build/_collections/utils/log.util.js +195 -5
- package/build/_collections/utils/log.util.js.map +1 -1
- package/build/_collections/utils/math/box-bounds.util.d.ts +36 -0
- package/build/_collections/utils/math/box-bounds.util.d.ts.map +1 -1
- package/build/_collections/utils/math/box-bounds.util.js +36 -0
- package/build/_collections/utils/math/box-bounds.util.js.map +1 -1
- package/build/_collections/utils/math/math.util.d.ts +48 -12
- package/build/_collections/utils/math/math.util.d.ts.map +1 -1
- package/build/_collections/utils/math/math.util.js +48 -14
- package/build/_collections/utils/math/math.util.js.map +1 -1
- package/build/_collections/utils/math/math.util.spec.js +0 -9
- package/build/_collections/utils/math/math.util.spec.js.map +1 -1
- package/build/_collections/utils/math/random.util.d.ts +30 -0
- package/build/_collections/utils/math/random.util.d.ts.map +1 -1
- package/build/_collections/utils/math/random.util.js +30 -0
- package/build/_collections/utils/math/random.util.js.map +1 -1
- package/build/_collections/utils/math/trigonometry.util.d.ts +30 -0
- package/build/_collections/utils/math/trigonometry.util.d.ts.map +1 -1
- package/build/_collections/utils/math/trigonometry.util.js +30 -0
- package/build/_collections/utils/math/trigonometry.util.js.map +1 -1
- package/build/_collections/utils/math/vector2.util.d.ts +247 -17
- package/build/_collections/utils/math/vector2.util.d.ts.map +1 -1
- package/build/_collections/utils/math/vector2.util.js +247 -19
- package/build/_collections/utils/math/vector2.util.js.map +1 -1
- package/build/_collections/utils/regex/password-regex.util.d.ts +12 -0
- package/build/_collections/utils/regex/password-regex.util.d.ts.map +1 -1
- package/build/_collections/utils/regex/password-regex.util.js +12 -0
- package/build/_collections/utils/regex/password-regex.util.js.map +1 -1
- package/build/_collections/utils/round-list.util.d.ts +39 -0
- package/build/_collections/utils/round-list.util.d.ts.map +1 -1
- package/build/_collections/utils/round-list.util.js +39 -0
- package/build/_collections/utils/round-list.util.js.map +1 -1
- package/build/_collections/utils/stack.util.d.ts +19 -0
- package/build/_collections/utils/stack.util.d.ts.map +1 -1
- package/build/_collections/utils/stack.util.js +19 -0
- package/build/_collections/utils/stack.util.js.map +1 -1
- package/build/_collections/utils/string.util.d.ts +17 -0
- package/build/_collections/utils/string.util.d.ts.map +1 -1
- package/build/_collections/utils/string.util.js +17 -0
- package/build/_collections/utils/string.util.js.map +1 -1
- package/build/_collections/utils/time.util.d.ts +136 -0
- package/build/_collections/utils/time.util.d.ts.map +1 -1
- package/build/_collections/utils/time.util.js +136 -0
- package/build/_collections/utils/time.util.js.map +1 -1
- package/build/_collections/utils/utilities.util.d.ts +17 -1
- package/build/_collections/utils/utilities.util.d.ts.map +1 -1
- package/build/_collections/utils/utilities.util.js +17 -1
- package/build/_collections/utils/utilities.util.js.map +1 -1
- package/build/_collections/utils/uuid.util.d.ts +6 -0
- package/build/_collections/utils/uuid.util.d.ts.map +1 -1
- package/build/_collections/utils/uuid.util.js +6 -0
- package/build/_collections/utils/uuid.util.js.map +1 -1
- package/build/_enums/data-model-type.enum.d.ts +6 -0
- package/build/_enums/data-model-type.enum.d.ts.map +1 -1
- package/build/_enums/data-model-type.enum.js +6 -0
- package/build/_enums/data-model-type.enum.js.map +1 -1
- package/build/_enums/http/http-call-type.enum.d.ts +8 -0
- package/build/_enums/http/http-call-type.enum.d.ts.map +1 -1
- package/build/_enums/http/http-call-type.enum.js +8 -0
- package/build/_enums/http/http-call-type.enum.js.map +1 -1
- package/build/_enums/http/http-event-type.enum.d.ts +5 -0
- package/build/_enums/http/http-event-type.enum.d.ts.map +1 -1
- package/build/_enums/http/http-event-type.enum.js +5 -0
- package/build/_enums/http/http-event-type.enum.js.map +1 -1
- package/build/_enums/time/day-of-week.enum.d.ts +14 -1
- package/build/_enums/time/day-of-week.enum.d.ts.map +1 -1
- package/build/_enums/time/day-of-week.enum.js +14 -1
- package/build/_enums/time/day-of-week.enum.js.map +1 -1
- package/build/_models/control-models/data-model-params.control-model.d.ts.map +1 -1
- package/build/_models/control-models/data-model-params.control-model.js +11 -1
- package/build/_models/control-models/data-model-params.control-model.js.map +1 -1
- package/build/_models/control-models/data-property-params.control-model.d.ts +8 -0
- package/build/_models/control-models/data-property-params.control-model.d.ts.map +1 -1
- package/build/_models/control-models/data-property-params.control-model.js +8 -0
- package/build/_models/control-models/data-property-params.control-model.js.map +1 -1
- package/build/_models/control-models/http/http-error-response.control-model.d.ts +25 -0
- package/build/_models/control-models/http/http-error-response.control-model.d.ts.map +1 -1
- package/build/_models/control-models/http/http-error-response.control-model.js +25 -0
- package/build/_models/control-models/http/http-error-response.control-model.js.map +1 -1
- package/build/_models/control-models/http/http-headers.control-model.d.ts +8 -0
- package/build/_models/control-models/http/http-headers.control-model.d.ts.map +1 -1
- package/build/_models/control-models/http/http-headers.control-model.js +8 -0
- package/build/_models/control-models/http/http-headers.control-model.js.map +1 -1
- package/build/_models/control-models/http/http-response.model-base.d.ts +9 -0
- package/build/_models/control-models/http/http-response.model-base.d.ts.map +1 -1
- package/build/_models/control-models/http/http-response.model-base.js +9 -0
- package/build/_models/control-models/http/http-response.model-base.js.map +1 -1
- package/build/_models/control-models/poll.control-model.d.ts +18 -0
- package/build/_models/control-models/poll.control-model.d.ts.map +1 -1
- package/build/_models/control-models/poll.control-model.js +18 -0
- package/build/_models/control-models/poll.control-model.js.map +1 -1
- package/build/_models/control-models/range-value.control-model.d.ts +141 -0
- package/build/_models/control-models/range-value.control-model.d.ts.map +1 -1
- package/build/_models/control-models/range-value.control-model.js +141 -0
- package/build/_models/control-models/range-value.control-model.js.map +1 -1
- package/build/_models/control-models/server-status.control-model.d.ts +10 -0
- package/build/_models/control-models/server-status.control-model.d.ts.map +1 -1
- package/build/_models/control-models/server-status.control-model.js +10 -0
- package/build/_models/control-models/server-status.control-model.js.map +1 -1
- package/build/_models/control-models/service-endpoint-settings-base.control-model.d.ts +12 -0
- package/build/_models/control-models/service-endpoint-settings-base.control-model.d.ts.map +1 -1
- package/build/_models/control-models/service-endpoint-settings-base.control-model.js +12 -0
- package/build/_models/control-models/service-endpoint-settings-base.control-model.js.map +1 -1
- package/build/_models/data-models/errors.data-model.d.ts +10 -0
- package/build/_models/data-models/errors.data-model.d.ts.map +1 -1
- package/build/_models/data-models/errors.data-model.js +10 -0
- package/build/_models/data-models/errors.data-model.js.map +1 -1
- package/build/_models/data-models/metadata.data-model.d.ts +26 -0
- package/build/_models/data-models/metadata.data-model.d.ts.map +1 -1
- package/build/_models/data-models/metadata.data-model.js +26 -0
- package/build/_models/data-models/metadata.data-model.js.map +1 -1
- package/build/_modules/ci-tools/_models/cit-ci-result-info.data-models.d.ts +23 -0
- package/build/_modules/ci-tools/_models/cit-ci-result-info.data-models.d.ts.map +1 -1
- package/build/_modules/ci-tools/_models/cit-ci-result-info.data-models.js +23 -0
- package/build/_modules/ci-tools/_models/cit-ci-result-info.data-models.js.map +1 -1
- package/build/_modules/custom-data/_models/cud.data-model.d.ts +7 -0
- package/build/_modules/custom-data/_models/cud.data-model.d.ts.map +1 -1
- package/build/_modules/custom-data/_models/cud.data-model.js +7 -0
- package/build/_modules/custom-data/_models/cud.data-model.js.map +1 -1
- package/build/_modules/location/_collections/loc-regions.util.d.ts +33 -0
- package/build/_modules/location/_collections/loc-regions.util.d.ts.map +1 -1
- package/build/_modules/location/_collections/loc-regions.util.js +33 -0
- package/build/_modules/location/_collections/loc-regions.util.js.map +1 -1
- package/build/_modules/location/_collections/loc.util.d.ts +10 -0
- package/build/_modules/location/_collections/loc.util.d.ts.map +1 -1
- package/build/_modules/location/_collections/loc.util.js +10 -0
- package/build/_modules/location/_collections/loc.util.js.map +1 -1
- package/futdevpro-fsm-dynamo-01.14.11.tgz +0 -0
- package/package.json +1 -1
- package/src/_collections/constants/data-sizes.const.ts +4 -4
- package/src/_collections/utils/array.util.ts +189 -0
- package/src/_collections/utils/async.util.ts +40 -0
- package/src/_collections/utils/json-error-helper.util.ts +38 -0
- package/src/_collections/utils/log.util.ts +194 -4
- package/src/_collections/utils/math/box-bounds.util.ts +36 -0
- package/src/_collections/utils/math/math.util.spec.ts +0 -10
- package/src/_collections/utils/math/math.util.ts +48 -16
- package/src/_collections/utils/math/random.util.ts +30 -0
- package/src/_collections/utils/math/trigonometry.util.ts +30 -0
- package/src/_collections/utils/math/vector2.util.ts +254 -24
- package/src/_collections/utils/regex/password-regex.util.ts +12 -0
- package/src/_collections/utils/round-list.util.ts +39 -0
- package/src/_collections/utils/stack.util.ts +19 -0
- package/src/_collections/utils/string.util.ts +17 -0
- package/src/_collections/utils/time.util.ts +136 -0
- package/src/_collections/utils/utilities.util.ts +17 -1
- package/src/_collections/utils/uuid.util.ts +6 -0
- package/src/_enums/data-model-type.enum.ts +6 -0
- package/src/_enums/http/http-call-type.enum.ts +8 -0
- package/src/_enums/http/http-event-type.enum.ts +5 -0
- package/src/_enums/time/day-of-week.enum.ts +14 -1
- package/src/_models/control-models/data-model-params.control-model.ts +11 -1
- package/src/_models/control-models/data-property-params.control-model.ts +8 -0
- package/src/_models/control-models/http/http-error-response.control-model.ts +25 -0
- package/src/_models/control-models/http/http-headers.control-model.ts +8 -0
- package/src/_models/control-models/http/http-response.model-base.ts +9 -0
- package/src/_models/control-models/poll.control-model.ts +18 -0
- package/src/_models/control-models/range-value.control-model.ts +141 -0
- package/src/_models/control-models/server-status.control-model.ts +10 -0
- package/src/_models/control-models/service-endpoint-settings-base.control-model.ts +12 -0
- package/src/_models/data-models/errors.data-model.ts +10 -0
- package/src/_models/data-models/metadata.data-model.ts +27 -0
- package/src/_modules/ci-tools/_models/cit-ci-result-info.data-models.ts +23 -0
- package/src/_modules/custom-data/_models/cud.data-model.ts +7 -0
- package/src/_modules/location/_collections/loc-regions.util.ts +34 -1
- package/src/_modules/location/_collections/loc.util.ts +10 -0
- package/futdevpro-fsm-dynamo-01.14.10.tgz +0 -0
|
@@ -7,6 +7,13 @@ export type DyFM_Vector2_U = DyFM_Vector2_Util;
|
|
|
7
7
|
* is that static functions return new Vector2,
|
|
8
8
|
* while instance functions change the current Vector2 and returns itself.
|
|
9
9
|
* (if this is not true, report it as a bug)
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* ```ts
|
|
13
|
+
* const vector2 = new DyFM_Vector2_Util(1);
|
|
14
|
+
* const vector2 = new DyFM_Vector2_Util(1, 2);
|
|
15
|
+
* const vector2 = new DyFM_Vector2_Util({ x: 1, y: 2 });
|
|
16
|
+
* ```
|
|
10
17
|
*/
|
|
11
18
|
export declare class DyFM_Vector2_Util implements DyFM_Vector2 {
|
|
12
19
|
readonly isVector2Util: boolean;
|
|
@@ -53,153 +60,376 @@ export declare class DyFM_Vector2_Util implements DyFM_Vector2 {
|
|
|
53
60
|
constructed?(): boolean;
|
|
54
61
|
/**
|
|
55
62
|
* returns the distance between two vectors
|
|
63
|
+
*
|
|
64
|
+
* @example
|
|
65
|
+
* ```ts
|
|
66
|
+
* const distance = DyFM_Vector2_Util.distance({ x: 1, y: 2 }, { x: 3, y: 4 });
|
|
67
|
+
* console.log(distance); // 2.8284271247461903
|
|
68
|
+
* ```
|
|
56
69
|
*/
|
|
57
70
|
static distance(a: DyFM_Vector2, b: DyFM_Vector2): number;
|
|
58
71
|
distance(to: DyFM_Vector2): number;
|
|
59
72
|
/**
|
|
60
|
-
* returns a new vector with the
|
|
73
|
+
* returns a new vector with the subtraction of two vectors
|
|
74
|
+
*
|
|
75
|
+
* @example
|
|
76
|
+
* ```ts
|
|
77
|
+
* const minus = DyFM_Vector2_Util.minus({ x: 1, y: 2 }, { x: 3, y: 4 });
|
|
78
|
+
* console.log(minus); // { x: -2, y: -2 }
|
|
79
|
+
* ```
|
|
61
80
|
*/
|
|
62
81
|
static minus(a: DyFM_Vector2, minusB: DyFM_Vector2): DyFM_Vector2_Util;
|
|
63
82
|
minus(vector: DyFM_Vector2): this;
|
|
64
83
|
/**
|
|
65
84
|
* returns a new vector with the sum of two vectors
|
|
85
|
+
*
|
|
86
|
+
* @example
|
|
87
|
+
* ```ts
|
|
88
|
+
* const plus = DyFM_Vector2_Util.plus({ x: 1, y: 2 }, { x: 3, y: 4 });
|
|
89
|
+
* console.log(plus); // { x: 4, y: 6 }
|
|
90
|
+
* ```
|
|
66
91
|
*/
|
|
67
92
|
static plus(a: DyFM_Vector2, plusB: DyFM_Vector2): DyFM_Vector2_Util;
|
|
68
93
|
plus(vector: DyFM_Vector2): this;
|
|
69
94
|
static readonly add: typeof DyFM_Vector2_Util.plus;
|
|
70
95
|
readonly add: (vector: DyFM_Vector2) => this;
|
|
71
|
-
/** returns new
|
|
96
|
+
/** returns a new vector with the multiplication of two vectors
|
|
97
|
+
* @example
|
|
98
|
+
* ```ts
|
|
99
|
+
* const multiply = DyFM_Vector2_Util.multiply({ x: 1, y: 2 }, 2);
|
|
100
|
+
* console.log(multiply); // { x: 2, y: 4 }
|
|
101
|
+
* ```
|
|
102
|
+
*/
|
|
72
103
|
static multiply(v: DyFM_Vector2, n: number): DyFM_Vector2_Util;
|
|
73
104
|
multiply(n: number): this;
|
|
74
|
-
/** returns new
|
|
105
|
+
/** returns a new vector with the division of two vectors
|
|
106
|
+
* @example
|
|
107
|
+
* ```ts
|
|
108
|
+
* const divide = DyFM_Vector2_Util.divide({ x: 1, y: 2 }, 2);
|
|
109
|
+
* console.log(divide); // { x: 0.5, y: 1 }
|
|
110
|
+
* ```
|
|
111
|
+
*/
|
|
75
112
|
static divide(v: DyFM_Vector2, divideBy: number): DyFM_Vector2_Util;
|
|
76
113
|
divide(n: number): this;
|
|
114
|
+
/** returns the negative value of the original vector at new vector
|
|
115
|
+
* @example
|
|
116
|
+
* ```ts
|
|
117
|
+
* const negative = DyFM_Vector2_Util.negative({ x: 1, y: 2 });
|
|
118
|
+
* console.log(negative); // { x: -1, y: -2 }
|
|
119
|
+
* ```
|
|
120
|
+
*/
|
|
77
121
|
static negative(v: DyFM_Vector2): DyFM_Vector2_Util;
|
|
78
122
|
/** this returns a new instance */
|
|
79
123
|
getNegative(): DyFM_Vector2_Util;
|
|
80
124
|
negate(): this;
|
|
81
125
|
/**
|
|
82
|
-
* returns a new vector with the
|
|
126
|
+
* returns a new vector with the rebase of the original vector
|
|
127
|
+
*
|
|
128
|
+
* @example
|
|
129
|
+
* ```ts
|
|
130
|
+
* const rebase = DyFM_Vector2_Util.rebase({ x: 1, y: 2 }, { x: 3, y: 4 }, { x: 5, y: 6 });
|
|
131
|
+
* console.log(rebase); // { x: 4, y: 6 }
|
|
132
|
+
* ```
|
|
83
133
|
*/
|
|
84
134
|
static rebase(v: DyFM_Vector2, baseFrom: DyFM_Vector2, baseTo: DyFM_Vector2): DyFM_Vector2_Util;
|
|
85
135
|
rebase(baseFrom: DyFM_Vector2, baseTo: DyFM_Vector2): this;
|
|
86
136
|
/**
|
|
87
|
-
* returns a new vector with the
|
|
137
|
+
* returns a new vector with the rotation of the original vector by degrees
|
|
138
|
+
*
|
|
139
|
+
* @example
|
|
140
|
+
* ```ts
|
|
141
|
+
* const rotate = DyFM_Vector2_Util.rotate({ x: 1, y: 2 }, 30);
|
|
142
|
+
* console.log(rotate); // { x: 0.8660254037844386, y: 1.5 }
|
|
143
|
+
* ```
|
|
88
144
|
*/
|
|
89
145
|
static rotate(vector: DyFM_Vector2, angle: number): DyFM_Vector2_Util;
|
|
90
146
|
/**
|
|
91
|
-
* returns a new vector with the
|
|
147
|
+
* returns a new vector with the rotation of the original vector by radians
|
|
148
|
+
*
|
|
149
|
+
* @example
|
|
150
|
+
* ```ts
|
|
151
|
+
* const rotateRad = DyFM_Vector2_Util.rotateRad({ x: 1, y: 2 }, 3.141592653589793);
|
|
152
|
+
* console.log(rotateRad); // { x: -1, y: 2 }
|
|
153
|
+
* ```
|
|
92
154
|
*/
|
|
93
155
|
static rotateRad(vector: DyFM_Vector2, rad: number): DyFM_Vector2_Util;
|
|
94
156
|
/**
|
|
95
|
-
* returns a new vector with the
|
|
157
|
+
* returns a new vector with the rotation of the original vector by degrees
|
|
158
|
+
*
|
|
159
|
+
* @example
|
|
160
|
+
* ```ts
|
|
161
|
+
* const vector = new DyFM_Vector2_Util({ x: 1, y: 2 });
|
|
162
|
+
* vector.rotate(30);
|
|
163
|
+
* ```
|
|
96
164
|
*/
|
|
97
165
|
rotate(angle: number): this;
|
|
98
166
|
/**
|
|
99
|
-
* returns a new vector with the
|
|
167
|
+
* returns a new vector with the rotation of the original vector by radians
|
|
168
|
+
*
|
|
169
|
+
* @example
|
|
170
|
+
* ```ts
|
|
171
|
+
* const vector = new DyFM_Vector2_Util({ x: 1, y: 2 });
|
|
172
|
+
* vector.rotateRad(3.141592653589793);
|
|
173
|
+
* ```
|
|
100
174
|
*/
|
|
101
175
|
rotateRad(rad: number): this;
|
|
102
176
|
/**
|
|
103
|
-
* returns a new
|
|
177
|
+
* returns a new DyFM_Vector2_Util with the new values
|
|
178
|
+
*
|
|
179
|
+
* @example
|
|
180
|
+
* ```ts
|
|
181
|
+
* const vector = new DyFM_Vector2_Util({ x: 1, y: 2 });
|
|
182
|
+
* vector.newValues({ x: 3, y: 4 });
|
|
183
|
+
* ```
|
|
104
184
|
*/
|
|
105
185
|
newValues(newV: DyFM_Vector2): this;
|
|
106
186
|
/**
|
|
107
187
|
* returns a new vector with the sum of a vector and the difference of two vectors
|
|
188
|
+
*
|
|
189
|
+
* @example
|
|
190
|
+
* ```ts
|
|
191
|
+
* const vector = new DyFM_Vector2_Util({ x: 1, y: 2 });
|
|
192
|
+
* vector.newXY(3, 4);
|
|
193
|
+
* ```
|
|
108
194
|
*/
|
|
109
195
|
newXY(newX: number, newY: number): this;
|
|
110
196
|
/**
|
|
111
|
-
* returns a new
|
|
197
|
+
* returns a new DyFM_Vector2_Util with the new values
|
|
198
|
+
*
|
|
199
|
+
* @example
|
|
200
|
+
* ```ts
|
|
201
|
+
* const vector = new DyFM_Vector2_Util({ x: 1, y: 2 });
|
|
202
|
+
* DyFM_Vector2_Util.newValues(vector, { x: 3, y: 4 });
|
|
203
|
+
* ```
|
|
112
204
|
*/
|
|
113
205
|
static newValues(to: DyFM_Vector2, newV: DyFM_Vector2): DyFM_Vector2;
|
|
114
206
|
static readonly newXY: typeof DyFM_Vector2_Util.newValues;
|
|
115
207
|
/**
|
|
116
208
|
* returns the angle between two vectors
|
|
209
|
+
*
|
|
210
|
+
* @example
|
|
211
|
+
* ```ts
|
|
212
|
+
* const angle = DyFM_Vector2_Util.angle({ x: 1, y: 2 }, { x: 3, y: 4 });
|
|
213
|
+
* console.log(angle); // 45
|
|
214
|
+
* ```
|
|
117
215
|
*/
|
|
118
216
|
static angle(from: DyFM_Vector2, to: DyFM_Vector2): number;
|
|
119
217
|
/**
|
|
120
218
|
* returns the angle between two vectors in radians
|
|
219
|
+
*
|
|
220
|
+
* @example
|
|
221
|
+
* ```ts
|
|
222
|
+
* const angleRad = DyFM_Vector2_Util.angleRad({ x: 1, y: 2 }, { x: 3, y: 4 });
|
|
223
|
+
* console.log(angleRad); // 0.7853981633974483
|
|
224
|
+
* ```
|
|
121
225
|
*/
|
|
122
226
|
static angleRad(from: DyFM_Vector2, to: DyFM_Vector2): number;
|
|
123
227
|
/**
|
|
124
228
|
* returns the angle between two vectors
|
|
229
|
+
*
|
|
230
|
+
* @example
|
|
231
|
+
* ```ts
|
|
232
|
+
* const vector = new DyFM_Vector2_Util({ x: 1, y: 2 });
|
|
233
|
+
* const angle = vector.angle({ x: 3, y: 4 });
|
|
234
|
+
* console.log(angle); // 45
|
|
235
|
+
* ```
|
|
125
236
|
*/
|
|
126
237
|
angle(from: DyFM_Vector2, to: DyFM_Vector2): number;
|
|
127
238
|
/**
|
|
128
239
|
* returns the angle between two vectors in degrees
|
|
240
|
+
*
|
|
241
|
+
* @example
|
|
242
|
+
* ```ts
|
|
243
|
+
* const angle = DyFM_Vector2_Util.deg({ x: 1, y: 2 });
|
|
244
|
+
* console.log(angle); // 45
|
|
129
245
|
*/
|
|
130
246
|
static deg(vector: DyFM_Vector2): number;
|
|
131
247
|
/**
|
|
132
248
|
* returns the angle between two vectors in radians
|
|
249
|
+
*
|
|
250
|
+
* @example
|
|
251
|
+
* ```ts
|
|
252
|
+
* const angleRad = DyFM_Vector2_Util.rad({ x: 1, y: 2 });
|
|
253
|
+
* console.log(angleRad); // 0.7853981633974483
|
|
254
|
+
* ```
|
|
133
255
|
*/
|
|
134
256
|
static rad(vector: DyFM_Vector2): number;
|
|
135
257
|
/**
|
|
136
|
-
* returns the angle
|
|
258
|
+
* returns the vector angle in degrees
|
|
259
|
+
*
|
|
260
|
+
* @example
|
|
261
|
+
* ```ts
|
|
262
|
+
* const vector = new DyFM_Vector2_Util({ x: 1, y: 2 });
|
|
263
|
+
* const deg = vector.deg();
|
|
264
|
+
* console.log(deg); // 45
|
|
265
|
+
* ```
|
|
137
266
|
*/
|
|
138
267
|
deg(): number;
|
|
139
268
|
/**
|
|
140
269
|
* returns math floor of the vector
|
|
270
|
+
*
|
|
271
|
+
* @example
|
|
272
|
+
* ```ts
|
|
273
|
+
* const vector = DyFM_Vector2_Util.floor({ x: 1.5, y: 2.5 });
|
|
274
|
+
* console.log(vector); // { x: 1, y: 2 }
|
|
275
|
+
* ```
|
|
141
276
|
*/
|
|
142
277
|
static floor(v: DyFM_Vector2): DyFM_Vector2_Util;
|
|
143
278
|
/**
|
|
144
279
|
* returns math floor of the vector
|
|
280
|
+
*
|
|
281
|
+
* @example
|
|
282
|
+
* ```ts
|
|
283
|
+
* const vector = new DyFM_Vector2_Util({ x: 1.5, y: 2.5 });
|
|
284
|
+
* const floor = vector.floor();
|
|
285
|
+
* console.log(floor); // { x: 1, y: 2 }
|
|
286
|
+
* ```
|
|
145
287
|
*/
|
|
146
288
|
floor(): DyFM_Vector2_Util;
|
|
147
289
|
/**
|
|
148
290
|
* returns the direction vector from one point to another
|
|
291
|
+
*
|
|
292
|
+
* @example
|
|
293
|
+
* ```ts
|
|
294
|
+
* const direction = DyFM_Vector2_Util.direction({ x: 1, y: 2 }, { x: 3, y: 4 });
|
|
295
|
+
* console.log(direction); // { x: 2, y: 2 }
|
|
296
|
+
* ```
|
|
149
297
|
*/
|
|
150
298
|
static direction(from: DyFM_Vector2, to: DyFM_Vector2): DyFM_Vector2_Util;
|
|
151
299
|
/**
|
|
152
300
|
* returns the direction vector from one point to another
|
|
301
|
+
*
|
|
302
|
+
* @example
|
|
303
|
+
* ```ts
|
|
304
|
+
* const vector = new DyFM_Vector2_Util({ x: 1, y: 2 });
|
|
305
|
+
* const direction = vector.direction({ x: 3, y: 4 });
|
|
306
|
+
* console.log(direction); // { x: 2, y: 2 }
|
|
307
|
+
* ```
|
|
153
308
|
*/
|
|
154
309
|
direction(to: DyFM_Vector2): DyFM_Vector2_Util;
|
|
155
310
|
/**
|
|
156
311
|
* returns a normalized vector
|
|
312
|
+
*
|
|
313
|
+
* @example
|
|
314
|
+
* ```ts
|
|
315
|
+
* const vector = DyFM_Vector2_Util.normalize({ x: 1, y: 2 });
|
|
316
|
+
* console.log(vector); // { x: 0.4472135954999579, y: 0.8944271909999159 }
|
|
317
|
+
* ```
|
|
157
318
|
*/
|
|
158
319
|
static normalize(v: DyFM_Vector2): DyFM_Vector2_Util;
|
|
159
320
|
/**
|
|
160
321
|
* returns a normalized vector
|
|
322
|
+
*
|
|
323
|
+
* @example
|
|
324
|
+
* ```ts
|
|
325
|
+
* const vector = new DyFM_Vector2_Util({ x: 1, y: 2 });
|
|
326
|
+
* vector.normalize();
|
|
327
|
+
* console.log(vector); // { x: 0.4472135954999579, y: 0.8944271909999159 }
|
|
328
|
+
* ```
|
|
161
329
|
*/
|
|
162
330
|
normalize(): void;
|
|
163
331
|
/**
|
|
164
332
|
* this will return a new instance,
|
|
165
333
|
* if you want to change the current instance, use normalize()
|
|
166
|
-
|
|
334
|
+
*
|
|
335
|
+
* @example
|
|
336
|
+
* ```ts
|
|
337
|
+
* const vector = new DyFM_Vector2_Util({ x: 1, y: 2 });
|
|
338
|
+
* const normalized = vector.normalized();
|
|
339
|
+
* console.log(normalized); // { x: 0.4472135954999579, y: 0.8944271909999159 }
|
|
340
|
+
* ```
|
|
341
|
+
*/
|
|
167
342
|
normalized(): DyFM_Vector2_Util;
|
|
168
343
|
/**
|
|
169
344
|
* returns the magnitude of the vector
|
|
345
|
+
*
|
|
346
|
+
* @example
|
|
347
|
+
* ```ts
|
|
348
|
+
* const vector = new DyFM_Vector2_Util({ x: 1, y: 2 });
|
|
349
|
+
* const magnitude = vector.magnitude();
|
|
350
|
+
* console.log(magnitude); // 2.23606797749979
|
|
351
|
+
* ```
|
|
170
352
|
*/
|
|
171
353
|
private calcMagnitude;
|
|
172
354
|
/**
|
|
173
355
|
* returns a new vector with the same values
|
|
356
|
+
*
|
|
357
|
+
* @example
|
|
358
|
+
* ```ts
|
|
359
|
+
* const vector = new DyFM_Vector2_Util({ x: 1, y: 2 });
|
|
360
|
+
* const clone = vector.clone();
|
|
361
|
+
* console.log(clone); // { x: 1, y: 2 }
|
|
362
|
+
* ```
|
|
174
363
|
*/
|
|
175
364
|
clone(): DyFM_Vector2_Util;
|
|
176
365
|
/**
|
|
177
366
|
* returns true if the vector has changed
|
|
367
|
+
*
|
|
368
|
+
* @example
|
|
369
|
+
* ```ts
|
|
370
|
+
* const vector1 = new DyFM_Vector2_Util({ x: 1, y: 2 });
|
|
371
|
+
* const vector2 = new DyFM_Vector2_Util({ x: 3, y: 4 });
|
|
372
|
+
* const isChanged = DyFM_Vector2_Util.isChanged(vector1, vector2);
|
|
373
|
+
* console.log(isChanged); // true
|
|
374
|
+
* ```
|
|
178
375
|
*/
|
|
179
376
|
static isChanged(a: DyFM_Vector2_Util, b: DyFM_Vector2_Util): boolean;
|
|
180
377
|
/**
|
|
181
378
|
* returns true if the vectors are equal
|
|
379
|
+
*
|
|
380
|
+
* @example
|
|
381
|
+
* ```ts
|
|
382
|
+
* const vector1 = new DyFM_Vector2_Util({ x: 1, y: 2 });
|
|
383
|
+
* const vector2 = new DyFM_Vector2_Util({ x: 1, y: 2 });
|
|
384
|
+
* const isEqual = DyFM_Vector2_Util.isEqual(vector1, vector2);
|
|
385
|
+
* console.log(isEqual); // true
|
|
386
|
+
* ```
|
|
182
387
|
*/
|
|
183
388
|
static isEqual(a: DyFM_Vector2, b: DyFM_Vector2): boolean;
|
|
184
389
|
/**
|
|
185
|
-
* returns true if the vectors
|
|
390
|
+
* returns true if the vectors have changed
|
|
391
|
+
*
|
|
392
|
+
* @example
|
|
393
|
+
* ```ts
|
|
394
|
+
* const vector1 = new DyFM_Vector2_Util({ x: 1, y: 2 });
|
|
395
|
+
* const vector2 = new DyFM_Vector2_Util({ x: 1, y: 2 });
|
|
396
|
+
* const isVectorChanged = DyFM_Vector2_Util.vectorChanged(vector1, vector2);
|
|
397
|
+
* console.log(isVectorChanged); // false
|
|
398
|
+
* ```
|
|
186
399
|
*/
|
|
187
400
|
static vectorChanged(a: DyFM_Vector2, b: DyFM_Vector2): boolean;
|
|
188
|
-
/**
|
|
189
|
-
* returns true if the vectors are equal
|
|
190
|
-
*/
|
|
191
|
-
static equals(a: DyFM_Vector2, b: DyFM_Vector2): boolean;
|
|
192
401
|
/**
|
|
193
402
|
* returns a new vector with the absolute values of the original vector
|
|
403
|
+
*
|
|
404
|
+
* @example
|
|
405
|
+
* ```ts
|
|
406
|
+
* const vector = new DyFM_Vector2_Util({ x: 1, y: 2 });
|
|
407
|
+
* const vector = DyFM_Vector2_Util.abs(vector);
|
|
408
|
+
* console.log(vector);
|
|
409
|
+
* ```
|
|
194
410
|
*/
|
|
195
411
|
static abs(v: DyFM_Vector2): DyFM_Vector2_Util;
|
|
196
412
|
abs(): this;
|
|
197
413
|
/**
|
|
198
414
|
* returns a new vector with the rounded values of the original vector
|
|
415
|
+
*
|
|
416
|
+
* @example
|
|
417
|
+
* ```ts
|
|
418
|
+
* const vector = new DyFM_Vector2_Util({ x: 1.5, y: 2.5 });
|
|
419
|
+
* const rounded = DyFM_Vector2_Util.round(vector);
|
|
420
|
+
* const rounded2 = DyFM_Vector2_Util.round(vector,3);
|
|
421
|
+
* ```
|
|
199
422
|
*/
|
|
200
423
|
static round(v: DyFM_Vector2, decimals?: number): DyFM_Vector2_Util;
|
|
201
424
|
/**
|
|
202
425
|
* returns a instance of DyFM_Vector2 from a DyFM_Vector2_Util
|
|
426
|
+
*
|
|
427
|
+
* @example
|
|
428
|
+
* ```ts
|
|
429
|
+
* const vector = new DyFM_Vector2_Util({ x: 1, y: 2 });
|
|
430
|
+
* const vector2 = DyFM_Vector2_Util.toVector2(vector);
|
|
431
|
+
* console.log(vector2);
|
|
432
|
+
* ```
|
|
203
433
|
*/
|
|
204
434
|
static toVector2(v: DyFM_Vector2_Util): DyFM_Vector2;
|
|
205
435
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vector2.util.d.ts","sourceRoot":"","sources":["../../../../src/_collections/utils/math/vector2.util.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,+CAA+C,CAAC;AAK7E,MAAM,MAAM,SAAS,GAAG,iBAAiB,CAAC;AAC1C,MAAM,MAAM,YAAY,GAAG,iBAAiB,CAAC;AAC7C,MAAM,MAAM,cAAc,GAAG,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