JavaScript Damage Formulas

Hey guys!

Well, I was wondering if there is some sort of abbreviation possibility built into RPG Maker MV as fas as custom formulas are concerned. Do I really have to use Math.whatever(x) all the time when using the .max/.min methods or Math.floor or exponents (Math.pow)? Or is there maybe even a way in JavaScript itself to make this shorter? For example, I tried x**y instead of Math.pow(x,y), which didn't seem to work.
You could create your own functions to act as 'wrappers' for the math functions. Put them all together in a library and you have a plugin you can use for all your projects. But how often are you really going to be writing these custom formulas?

I'm not an expert on javascript (yet) so there may well be some 'shortcuts' in the language, but there's something to be said for precision and clarity.
Yeah, you're right, the length of the formulas isn't an actual probem. I was just curious, because it looks so cumbersome to me and I was expecting there to be a better way of doing it. 🙂

Original thread: https://forums.rpgmakerweb.com/threads/javascript-damage-formulas.47171/