@sankhyalabs/core 4.0.1 → 4.0.2
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/.docs/classes/NumberUtils.md +11 -11
- package/dist/utils/NumberUtils.d.ts +11 -11
- package/dist/utils/NumberUtils.js +11 -11
- package/package.json +1 -1
- package/src/utils/NumberUtils.ts +11 -11
|
@@ -203,20 +203,20 @@ Realiza o arredondamento de casas decimais de um numero.
|
|
|
203
203
|
**`Example`**
|
|
204
204
|
|
|
205
205
|
```ts
|
|
206
|
-
|
|
207
|
-
|
|
206
|
+
Informo: (100.12) | 100.12
|
|
207
|
+
Informo: (100,12) | NaN
|
|
208
208
|
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
209
|
+
Informo: ("100.12", 1) | 100.1
|
|
210
|
+
Informo: ("100.12", 2) | 100.12
|
|
211
|
+
Informo: ("100.12", 3) | 100.12
|
|
212
212
|
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
213
|
+
Informo: ("100.15", 1) | 100.2
|
|
214
|
+
Informo: ("100.15", 2) | 100.15
|
|
215
|
+
Informo: ("100.15", 3) | 100.15
|
|
216
216
|
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
217
|
+
Informo: ("100.16", 1) | 100.2
|
|
218
|
+
Informo: ("100.16", 2) | 100.16
|
|
219
|
+
Informo: ("100.16", 3) | 100.16
|
|
220
220
|
```
|
|
221
221
|
|
|
222
222
|
#### Parameters
|
|
@@ -84,20 +84,20 @@ export declare class NumberUtils {
|
|
|
84
84
|
* @returns - O próprio numeral arredondado com a quantidade de casas decimais do argumento decimals.
|
|
85
85
|
*
|
|
86
86
|
* @example
|
|
87
|
-
*
|
|
88
|
-
*
|
|
87
|
+
* Informo: (100.12) | 100.12
|
|
88
|
+
* Informo: (100,12) | NaN
|
|
89
89
|
|
|
90
|
-
*
|
|
91
|
-
*
|
|
92
|
-
*
|
|
90
|
+
* Informo: ("100.12", 1) | 100.1
|
|
91
|
+
* Informo: ("100.12", 2) | 100.12
|
|
92
|
+
* Informo: ("100.12", 3) | 100.12
|
|
93
93
|
|
|
94
|
-
*
|
|
95
|
-
*
|
|
96
|
-
*
|
|
94
|
+
* Informo: ("100.15", 1) | 100.2
|
|
95
|
+
* Informo: ("100.15", 2) | 100.15
|
|
96
|
+
* Informo: ("100.15", 3) | 100.15
|
|
97
97
|
|
|
98
|
-
*
|
|
99
|
-
*
|
|
100
|
-
*
|
|
98
|
+
* Informo: ("100.16", 1) | 100.2
|
|
99
|
+
* Informo: ("100.16", 2) | 100.16
|
|
100
|
+
* Informo: ("100.16", 3) | 100.16
|
|
101
101
|
*/
|
|
102
102
|
static round(value: number, decimals?: number): number;
|
|
103
103
|
}
|
|
@@ -13,20 +13,20 @@ export class NumberUtils {
|
|
|
13
13
|
* @returns - O próprio numeral arredondado com a quantidade de casas decimais do argumento decimals.
|
|
14
14
|
*
|
|
15
15
|
* @example
|
|
16
|
-
*
|
|
17
|
-
*
|
|
16
|
+
* Informo: (100.12) | 100.12
|
|
17
|
+
* Informo: (100,12) | NaN
|
|
18
18
|
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
*
|
|
19
|
+
* Informo: ("100.12", 1) | 100.1
|
|
20
|
+
* Informo: ("100.12", 2) | 100.12
|
|
21
|
+
* Informo: ("100.12", 3) | 100.12
|
|
22
22
|
|
|
23
|
-
*
|
|
24
|
-
*
|
|
25
|
-
*
|
|
23
|
+
* Informo: ("100.15", 1) | 100.2
|
|
24
|
+
* Informo: ("100.15", 2) | 100.15
|
|
25
|
+
* Informo: ("100.15", 3) | 100.15
|
|
26
26
|
|
|
27
|
-
*
|
|
28
|
-
*
|
|
29
|
-
*
|
|
27
|
+
* Informo: ("100.16", 1) | 100.2
|
|
28
|
+
* Informo: ("100.16", 2) | 100.16
|
|
29
|
+
* Informo: ("100.16", 3) | 100.16
|
|
30
30
|
*/
|
|
31
31
|
static round(value, decimals = 2) {
|
|
32
32
|
const decimalNumber = new Number(value + 'e' + decimals);
|
package/package.json
CHANGED
package/src/utils/NumberUtils.ts
CHANGED
|
@@ -219,20 +219,20 @@ export class NumberUtils {
|
|
|
219
219
|
* @returns - O próprio numeral arredondado com a quantidade de casas decimais do argumento decimals.
|
|
220
220
|
*
|
|
221
221
|
* @example
|
|
222
|
-
*
|
|
223
|
-
*
|
|
222
|
+
* Informo: (100.12) | 100.12
|
|
223
|
+
* Informo: (100,12) | NaN
|
|
224
224
|
|
|
225
|
-
*
|
|
226
|
-
*
|
|
227
|
-
*
|
|
225
|
+
* Informo: ("100.12", 1) | 100.1
|
|
226
|
+
* Informo: ("100.12", 2) | 100.12
|
|
227
|
+
* Informo: ("100.12", 3) | 100.12
|
|
228
228
|
|
|
229
|
-
*
|
|
230
|
-
*
|
|
231
|
-
*
|
|
229
|
+
* Informo: ("100.15", 1) | 100.2
|
|
230
|
+
* Informo: ("100.15", 2) | 100.15
|
|
231
|
+
* Informo: ("100.15", 3) | 100.15
|
|
232
232
|
|
|
233
|
-
*
|
|
234
|
-
*
|
|
235
|
-
*
|
|
233
|
+
* Informo: ("100.16", 1) | 100.2
|
|
234
|
+
* Informo: ("100.16", 2) | 100.16
|
|
235
|
+
* Informo: ("100.16", 3) | 100.16
|
|
236
236
|
*/
|
|
237
237
|
static round(value: number, decimals: number = 2):number {
|
|
238
238
|
const decimalNumber:number = (new Number(value +'e' + decimals) as number);
|