cmath-js 1.1.0 → 1.2.0

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/README.md CHANGED
@@ -22,6 +22,7 @@ These functions accept either a `bigint` or an integer `number`:
22
22
  - [`popcount`](https://en.cppreference.com/w/cpp/numeric/popcount)
23
23
 
24
24
  ## Functions for both floats and ints
25
+ - [`iota`](https://en.cppreference.com/w/cpp/numeric/iota)
25
26
  - [`signbit`](https://en.cppreference.com/w/c/numeric/math/signbit)
26
27
 
27
28
  ## Test coverage
@@ -0,0 +1,2 @@
1
+ export declare function iota(mut_arrayToFill: bigint[], startValue: bigint): void;
2
+ export declare function iota(mut_arrayToFill: number[], startValue: number): void;
@@ -0,0 +1,8 @@
1
+ export function iota(mut_arrayToFill, startValue) {
2
+ mut_arrayToFill.fill(startValue);
3
+ let value = startValue;
4
+ for (const index of mut_arrayToFill.keys()) {
5
+ mut_arrayToFill[index] = value++;
6
+ }
7
+ }
8
+ //# sourceMappingURL=iota.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"iota.js","sourceRoot":"","sources":["../../src/all-numbers/iota.ts"],"names":[],"mappings":"AAKA,MAAM,UAAU,IAAI,CAAC,eAAoC,EAAE,UAA2B;IACrF,eAAe,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;IACjC,IAAI,KAAK,GAAG,UAAU,CAAC;IACvB,KAAK,MAAM,KAAK,IAAI,eAAe,CAAC,IAAI,EAAE,EAAE,CAAC;QAC5C,eAAe,CAAC,KAAK,CAAC,GAAG,KAAK,EAAE,CAAC;IAClC,CAAC;AACF,CAAC"}
package/package.json CHANGED
@@ -5,7 +5,7 @@
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/oskarlh/cmath-js.git"
7
7
  },
8
- "version": "1.1.0",
8
+ "version": "1.2.0",
9
9
  "exports": "./dist/index.js",
10
10
  "types": "./dist/index.d.ts",
11
11
  "type": "module",