Module:Shop calculator: Revision history

Jump to navigation Jump to search
Diff selection: mark the radio boxes of the versions to compare or click on a revision date to view it. (cur) = difference from current version, (prev) = difference from preceding version,  m = minor edit, → = section edit

17 October 2024

  • curprev 00:1300:13, 17 October 2024Alex talk contribs 5,197 bytes +5,197 Created page with "local p = {} local paramTest = require('Module:Paramtest') local yesNo = require('Module:Yesno') function truncate(num) local whole, decimal = math.modf(num + 0.000001) -- addition is to prevent floating point rounding issues return whole end function sell(basePrice, shopBuysAt, delta, baseStock, currentStock, quantitySold, itemValue) local total = 0 local upperBound = truncate(itemValue + (shopBuysAt * itemValue)) -- Item value + base price shop buys at local..."