@justinelliottcobb/amari-wasm 0.9.4 → 0.9.5
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/amari_wasm.d.ts +4 -4
- package/amari_wasm.js +14 -14
- package/amari_wasm_bg.wasm +0 -0
- package/package.json +1 -1
package/amari_wasm.d.ts
CHANGED
|
@@ -8,6 +8,10 @@ export function initEnumerative(): void;
|
|
|
8
8
|
* Convert Lorentz factor to velocity
|
|
9
9
|
*/
|
|
10
10
|
export function gamma_to_velocity(gamma: number): number;
|
|
11
|
+
/**
|
|
12
|
+
* Convert velocity to Lorentz factor
|
|
13
|
+
*/
|
|
14
|
+
export function velocity_to_gamma(velocity_magnitude: number): number;
|
|
11
15
|
/**
|
|
12
16
|
* Validate that this module loaded correctly
|
|
13
17
|
*/
|
|
@@ -16,10 +20,6 @@ export function validate_relativistic_module(): boolean;
|
|
|
16
20
|
* Calculate light deflection angle for photon grazing massive object
|
|
17
21
|
*/
|
|
18
22
|
export function light_deflection_angle(impact_parameter: number, mass: number): number;
|
|
19
|
-
/**
|
|
20
|
-
* Convert velocity to Lorentz factor
|
|
21
|
-
*/
|
|
22
|
-
export function velocity_to_gamma(velocity_magnitude: number): number;
|
|
23
23
|
/**
|
|
24
24
|
* Initialize the WASM module
|
|
25
25
|
*/
|
package/amari_wasm.js
CHANGED
|
@@ -243,6 +243,19 @@ export function gamma_to_velocity(gamma) {
|
|
|
243
243
|
return ret[0];
|
|
244
244
|
}
|
|
245
245
|
|
|
246
|
+
/**
|
|
247
|
+
* Convert velocity to Lorentz factor
|
|
248
|
+
* @param {number} velocity_magnitude
|
|
249
|
+
* @returns {number}
|
|
250
|
+
*/
|
|
251
|
+
export function velocity_to_gamma(velocity_magnitude) {
|
|
252
|
+
const ret = wasm.velocity_to_gamma(velocity_magnitude);
|
|
253
|
+
if (ret[2]) {
|
|
254
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
255
|
+
}
|
|
256
|
+
return ret[0];
|
|
257
|
+
}
|
|
258
|
+
|
|
246
259
|
/**
|
|
247
260
|
* Validate that this module loaded correctly
|
|
248
261
|
* @returns {boolean}
|
|
@@ -263,19 +276,6 @@ export function light_deflection_angle(impact_parameter, mass) {
|
|
|
263
276
|
return ret;
|
|
264
277
|
}
|
|
265
278
|
|
|
266
|
-
/**
|
|
267
|
-
* Convert velocity to Lorentz factor
|
|
268
|
-
* @param {number} velocity_magnitude
|
|
269
|
-
* @returns {number}
|
|
270
|
-
*/
|
|
271
|
-
export function velocity_to_gamma(velocity_magnitude) {
|
|
272
|
-
const ret = wasm.velocity_to_gamma(velocity_magnitude);
|
|
273
|
-
if (ret[2]) {
|
|
274
|
-
throw takeFromExternrefTable0(ret[1]);
|
|
275
|
-
}
|
|
276
|
-
return ret[0];
|
|
277
|
-
}
|
|
278
|
-
|
|
279
279
|
function passArrayF64ToWasm0(arg, malloc) {
|
|
280
280
|
const ptr = malloc(arg.length * 8, 8) >>> 0;
|
|
281
281
|
getFloat64ArrayMemory0().set(arg, ptr / 8);
|
|
@@ -5258,7 +5258,7 @@ function __wbg_get_imports() {
|
|
|
5258
5258
|
const ret = arg0.length;
|
|
5259
5259
|
return ret;
|
|
5260
5260
|
};
|
|
5261
|
-
imports.wbg.
|
|
5261
|
+
imports.wbg.__wbg_log_0fd8c2928e3d6b1b = function(arg0, arg1) {
|
|
5262
5262
|
console.log(getStringFromWasm0(arg0, arg1));
|
|
5263
5263
|
};
|
|
5264
5264
|
imports.wbg.__wbg_log_6c7b5f4f00b8ce3f = function(arg0) {
|
package/amari_wasm_bg.wasm
CHANGED
|
Binary file
|
package/package.json
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
"Amari Contributors"
|
|
6
6
|
],
|
|
7
7
|
"description": "WebAssembly bindings for Amari mathematical computing library - geometric algebra, tropical algebra, automatic differentiation, fusion systems, and information geometry",
|
|
8
|
-
"version": "0.9.
|
|
8
|
+
"version": "0.9.5",
|
|
9
9
|
"license": "MIT OR Apache-2.0",
|
|
10
10
|
"repository": {
|
|
11
11
|
"type": "git",
|