interface PriceCells { bool isCellLimit(double price); // next-higher cell limit or NaN if no more cells double nextCellLimit(double price); // next-lower cell limit or NaN if no more cells double previousCellLimit(double price); // go n steps down double nCellLimitsDown(double price, int n); // go n steps up double nCellLimitsUp(double price, int n); // convert to "cell space" (0=first cell limit, 1=next cell limit, -1=previous cell limit etc) double priceToCellNumber aka toCellNumber(double price); double cellNumberToPrice aka fromCellNumber(double cellNumber); default double basePrice() { ret cellNumberToPrice(0); } }