/**
* Convert a value to a percent.
*
* @export
* @param {number} a
* @param {number} b
* @return {number}
*/
export function PercentOf(a: number, b: number, large: boolean = false): number {
return a / b * (large ? 100 : 1);
}
/**
* Convert a value to a rounded percent.
*
* @export
* @param {number} a The value to convert
* @param {number} b The target max value
* @param {boolean} large convert the percent to a small value (0 ~ 1) or a large value (0 ~ 100)
* @return {number}
*/
export function RoundedPercentOf(a: number, b: number, large: boolean = false): number {
return Math.round(PercentOf(a, b, large));
}
// ...
There won't be a SolarCore anytime soon, as I currently have no plans to buy MZ. Even in MV the SFG_Utils plugin isn't anything so elaborate as a core plugin - it's literally what it says, just a few utility plugins.Lol imagine everyone's projects looking like
HudellCore
OssraCore
DoubleCore
NioCore
SolarCore
HimeCore
My preference is, don't do that and just alias functions in the ES5 way. I basically just don't use the class syntax for anything.cause we all have our own preference for aliasing classes using class syntax