Hacker News new | past | comments | ask | show | jobs | submit login

This is the script used for the underlying calculation:

// script.js

// Yield factors for each cheese type

const baseYieldFactors = { "cheddar": 0.10, "mozzarella": 0.20, "parmesan": 0.09, "gouda": 0.12, "brie": 0.15, "camembert": 0.15, "blue cheese": 0.13, "feta": 0.17, "ricotta": 0.20, "monterey jack": 0.10, "swiss": 0.10, "colby": 0.10, "provolone": 0.10, "cottage cheese": 0.18, "cream cheese": 0.20 };

// Milk type factors

const milkTypeFactors = { "cow": 1.0, "goat": 0.9, "sheep": 1.1, "buffalo": 1.2, "camel": 0.8, "mare": 0.7, "reindeer": 1.15, "yak": 1.10, "donkey": 0.75 };

// Calculate milk volume based on cheese type, milk type, and desired weight

var baseYield = baseYieldFactors[cheeseType]; var milkAdjustment = milkTypeFactors[milkType]; var adjustedYield = baseYield * milkAdjustment;

// Calculate milk volume range

var minMilkVolume = weight / (adjustedYield * 1.1); var maxMilkVolume = weight / (adjustedYield * 0.9);




Consider applying for YC's W25 batch! Applications are open till Nov 12.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: