Skip to content

Commit

Permalink
Minor changes.
Browse files Browse the repository at this point in the history
  • Loading branch information
Smoren committed May 12, 2024
1 parent 4ad4c74 commit d9f1e9b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/scripts/actions/test-parallel.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { Pool } from "multiprocess-pool";

function integrateTask([id, funcName, [a, b], columns]: [number, string, [number, number], number]): number {
function integrateTask([id, funcName, [a, b], columns]: [number, keyof typeof Math, [number, number], number]): number {
console.log(`-> task ${id} started`);
const ts = Date.now();

const func = Math[funcName as keyof typeof Math] as (x: number) => number;
const func = Math[funcName] as (x: number) => number;
const step = (b - a) / columns;
let integral = 0;

Expand Down

0 comments on commit d9f1e9b

Please sign in to comment.