Valens-AIO/types/helpers/ProbabilityHelper.d.ts

15 lines
553 B
TypeScript
Raw Normal View History

2022-07-30 00:35:54 -04:00
import { ILogger } from "../models/spt/utils/ILogger";
import { RandomUtil } from "../utils/RandomUtil";
export declare class ProbabilityHelper {
protected logger: ILogger;
protected randomUtil: RandomUtil;
constructor(logger: ILogger, randomUtil: RandomUtil);
/**
* Chance to roll a number out of 100
* @param chance Percentage chance roll should success
* @param scale scale of chance to allow support of numbers > 1-100
* @returns true if success
*/
rollChance(chance: number, scale?: number): boolean;
}