From e471cd7bc8f70ff2694715af99511b99d3014b0b Mon Sep 17 00:00:00 2001 From: Vortrex <3858226+VortrexFTW@users.noreply.github.com> Date: Mon, 22 Mar 2021 03:13:33 -0500 Subject: [PATCH] Add percentage util --- scripts/shared/native.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/scripts/shared/native.js b/scripts/shared/native.js index 82f0005c..224001af 100644 --- a/scripts/shared/native.js +++ b/scripts/shared/native.js @@ -559,4 +559,10 @@ function combine(a, b, c) { return toInteger((a << 20) | (b << 10) | c); } +// =========================================================================== + +function getPercentage(num, per) { + return (num/100)*per; +} + // =========================================================================== \ No newline at end of file