1.0.1 • Published 1 year ago
percentopia v1.0.1
Percentopia - Basic math.
Simple tool to calculate percentages. Percentopia is a promise wrapped Math.floor.
const Percentopia = require('percentopia');
var Values = Percentopia(90, 100);
/* Calculating the percentage of each Number individually. */
// -> [ 47.4%, 52.6% ]
if (Values[0] > Values[1]) console.log('First value is greater than the second.');
else console.log('Second value is greater than the first.');
/* Handling basic events. */
You can also use it in everyday situations.
var Apples = 12;
var Bananas = 10;
var Fruits = Percentopia(Apples, Bananas);
return console.log(`${Fruits[0]} percent of fruits are apples.`);