Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function trainingLab(w, h) {
- let lenghtCm = Number(w) * 100;
- let widthCm = Number(h) * 100;
- let coridorWidth = 100;
- let netWidth = widthCm - coridorWidth;
- let descWidth = 70;
- let descLenght = 120;
- let descsOnRow = netWidth / descWidth;
- let totalRows = lenghtCm / descLenght;
- let totalDescs = Math.floor(descsOnRow) * Math.floor(totalRows);
- let takenSpace = 3;
- let finalDescs = totalDescs - takenSpace;
- console.log(finalDescs.toFixed(0));
- }
Advertisement
Add Comment
Please, Sign In to add comment