The symbol '.' is now a NumericChar Block
This commit is contained in:
parent
4bb28c3f39
commit
9fb9335e97
@ -6,7 +6,7 @@
|
||||
<attribute name="maven.pomderived" value="true"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8">
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER">
|
||||
<attributes>
|
||||
<attribute name="maven.pomderived" value="true"/>
|
||||
</attributes>
|
||||
|
@ -8,9 +8,9 @@ import org.warp.picalculator.math.MathematicalSymbols;
|
||||
import org.warp.picalculator.math.parser.features.FeatureChar;
|
||||
import org.warp.picalculator.math.parser.features.interfaces.Feature;
|
||||
|
||||
public class BlockNumber extends BlockChar {
|
||||
public class BlockNumericChar extends BlockChar {
|
||||
|
||||
public BlockNumber(char ch) {
|
||||
public BlockNumericChar(char ch) {
|
||||
super(ch);
|
||||
}
|
||||
|
@ -8,7 +8,7 @@ import org.warp.picalculator.gui.expression.blocks.Block;
|
||||
import org.warp.picalculator.gui.expression.blocks.BlockChar;
|
||||
import org.warp.picalculator.gui.expression.blocks.BlockContainer;
|
||||
import org.warp.picalculator.gui.expression.blocks.BlockDivision;
|
||||
import org.warp.picalculator.gui.expression.blocks.BlockNumber;
|
||||
import org.warp.picalculator.gui.expression.blocks.BlockNumericChar;
|
||||
import org.warp.picalculator.gui.expression.blocks.BlockParenthesis;
|
||||
import org.warp.picalculator.gui.expression.blocks.BlockPower;
|
||||
import org.warp.picalculator.gui.expression.blocks.BlockReference;
|
||||
@ -70,7 +70,8 @@ public class NormalInputContainer extends InputContainer {
|
||||
case '7':
|
||||
case '8':
|
||||
case '9':
|
||||
return new BlockNumber(c);
|
||||
case '.':
|
||||
return new BlockNumericChar(c);
|
||||
case MathematicalSymbols.SINE:
|
||||
return new BlockSine();
|
||||
case MathematicalSymbols.PI:
|
||||
@ -102,7 +103,7 @@ public class NormalInputContainer extends InputContainer {
|
||||
currentBlock = currentBlock.getPreviousBlock();
|
||||
if (currentBlock == null) break;
|
||||
Block b = currentBlock.get();
|
||||
if (b instanceof BlockNumber || b instanceof BlockVariable) {
|
||||
if (b instanceof BlockNumericChar || b instanceof BlockVariable) {
|
||||
if (!groupedBefore) {
|
||||
groupedBefore = true;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user