Skip to content

Commit

Permalink
changes
Browse files Browse the repository at this point in the history
  • Loading branch information
axlecoffee committed Feb 25, 2024
1 parent b2b1d44 commit e217606
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 23 deletions.
41 changes: 20 additions & 21 deletions funny.js
Original file line number Diff line number Diff line change
@@ -1,22 +1,21 @@
const calculateElement = (index, multiplier) => {
const isEvenIndex = index % 2 === 0;
const power = isEvenIndex ? 1 : index;

return Math.sin(index / multiplier) * Math.pow(multiplier, power);
};

const generateArray = (size, multiplier, elementCalculator) => {
return Array.from({ length: size }, (_, index) => elementCalculator(index + 1, multiplier));
};

const mainFunction = (outerSize, innerSize, innerMultiplier) => {
const outerArray = generateArray(outerSize, innerSize, (index, multiplier) => {
return generateArray(index, multiplier, calculateElement);
});

return outerArray;
};

const result = mainFunction(3, 4, 2);
console.log(result);

const isEvenIndex = index % 2 === 0;
const power = isEvenIndex ? 1 : index;

return Math.sin(index / multiplier) * Math.pow(multiplier, power);
};

const generateArray = (size, multiplier, elementCalculator) => {
return Array.from({ length: size }, (_, index) => elementCalculator(index + 1, multiplier));
};

const mainFunction = (outerSize, innerSize, innerMultiplier) => {
const outerArray = generateArray(outerSize, innerSize, (index, multiplier) => {
return generateArray(index, multiplier, calculateElement);
});

return outerArray;
};

const result = mainFunction(3, 4, 2);
console.log(result);
2 changes: 0 additions & 2 deletions src/functions/get/getNetworth/getNetworth.js
Original file line number Diff line number Diff line change
Expand Up @@ -94,10 +94,8 @@ async function getNetworth(uuid, profileid) {

const createItemString = (item) => {
if (!item) return '';

const isRecombobulated = item.calculation.some((a) => a.id === 'RECOMBOBULATOR_3000');
const price = addNotation('oneLetters', handleSplits(item.price)) || 0;

if (item.count >= 2) {
return `→ \`${item.count}x\` ${item.name}${isRecombobulated ? `${RECOMBOBULATOR_3000}` : ''} (**${price}**)`;
} else {
Expand Down

0 comments on commit e217606

Please sign in to comment.