test new mod
This commit is contained in:
21
src/API.ts
21
src/API.ts
@ -989,16 +989,21 @@ export class UserAPI {
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
mod = (...pulse: number[]): boolean => {
|
public mod = (...n: number[]): boolean[] => {
|
||||||
/**
|
const results: boolean[] = n.map((value) => epulse() % value === 0);
|
||||||
* Returns true if the current pulse is a modulo of any of the given pulses.
|
return results.some((value) => value === true);
|
||||||
*
|
|
||||||
* @param pulse - The pulse to check for
|
|
||||||
* @returns True if the current pulse is a modulo of any of the given pulses
|
|
||||||
*/
|
|
||||||
return pulse.some((p) => this.app.clock.time_position.pulse % p === 0);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// mod = (...pulse: number[]): boolean => {
|
||||||
|
// /**
|
||||||
|
// * Returns true if the current pulse is a modulo of any of the given pulses.
|
||||||
|
// *
|
||||||
|
// * @param pulse - The pulse to check for
|
||||||
|
// * @returns True if the current pulse is a modulo of any of the given pulses
|
||||||
|
// */
|
||||||
|
// return pulse.some((p) => this.app.clock.time_position.pulse % p === 0);
|
||||||
|
// };
|
||||||
|
|
||||||
modbar = (...bar: number[]): boolean => {
|
modbar = (...bar: number[]): boolean => {
|
||||||
/**
|
/**
|
||||||
* Returns true if the current bar is a modulo of any of the given bars.
|
* Returns true if the current bar is a modulo of any of the given bars.
|
||||||
|
|||||||
Reference in New Issue
Block a user