fixing dumb mistakes

This commit is contained in:
2023-08-19 17:56:54 +02:00
parent 4c582b1cba
commit 0664625923

View File

@ -478,7 +478,7 @@ export class UserAPI {
public seqslice = (...args: any): any => { public seqslice = (...args: any): any => {
const chunk_size = args[0]; // Get the first argument (chunk size) const chunk_size = args[0]; // Get the first argument (chunk size)
const elements = args.slice(1); // Get the rest of the arguments as an array const elements = args.slice(1); // Get the rest of the arguments as an array
const timepos = epulse(); const timepos = this.epulse();
const slice_count = Math.floor(timepos / chunk_size); const slice_count = Math.floor(timepos / chunk_size);
return elements[slice_count % elements.length]; return elements[slice_count % elements.length];
}; };
@ -995,13 +995,13 @@ export class UserAPI {
}); });
}; };
public mod = (...n: number[]): boolean[] => { public mod = (...n: number[]): boolean => {
const results: boolean[] = n.map((value) => epulse() % value === 0); const results: boolean[] = n.map((value) => this.epulse() % value === 0);
return results.some((value) => value === true); return results.some((value) => value === true);
}; };
public modbar = (...n: number[]): boolean[] => { public modbar = (...n: number[]): boolean => {
const results: boolean[] = n.map((value) => bar() % value === 0); const results: boolean[] = n.map((value) => this.bar() % value === 0);
return results.some((value) => value === true); return results.some((value) => value === true);
}; };