private boolean foreEndInhibited = false;\r
private boolean aftEndInhibited = false;\r
private Amount<Length> length = Amount.valueOf(100, SI.MILLIMETER);\r
+ private Amount<Length> endLight = Amount.valueOf(0, SI.MILLIMETER);\r
\r
- protected int numberOfBurningEnds(){\r
+ protected int numberOfBurningEnds(Amount<Length> regression){\r
+ if ( regression.isLessThan(endLight) )\r
+ return 0;\r
return (foreEndInhibited?0:1) + (aftEndInhibited?0:1);\r
}\r
\r
protected Amount<Length> regressedLength(Amount<Length> regression){\r
- return length.minus(regression.times(numberOfBurningEnds()));\r
+ if ( regression.isLessThan(endLight) )\r
+ return length;\r
+ return length.minus(regression.minus(endLight).times(numberOfBurningEnds(regression)));\r
}\r
\r
public boolean isForeEndInhibited() {\r