Aufgrund einer Wartung wird GitLab am 21.09. zwischen 8:00 und 9:00 Uhr kurzzeitig nicht zur Verfügung stehen. / Due to maintenance, GitLab will be temporarily unavailable on 21.09. between 8:00 and 9:00 am.

Commit 50b2ae92 authored by Sebastian Nickels's avatar Sebastian Nickels
Browse files

Fixed getElementRange() method

parent 8094b336
Pipeline #226544 failed with stages
in 25 seconds
......@@ -52,13 +52,13 @@ public class ArchTypeSymbol extends CommonSymbol {
public HashMap<String, String> getElementRange() {
String min="", max="";
ASTRange range = domain.getRange();
if(domain.isRational() || domain.isWholeNumber() || domain.isNaturalNumber() || domain.isComplex()) {
if(range.hasNoLowerLimit()) { min="-inf"; } else {
min = Double.toString(range.getStartValue().doubleValue());
Optional<ASTRange> range = domain.getRangeOpt();
if (range.isPresent() && (domain.isRational() || domain.isWholeNumber() || domain.isNaturalNumber() || domain.isComplex())) {
if(range.get().hasNoLowerLimit()) { min="-inf"; } else {
min = Double.toString(range.get().getStartValue().doubleValue());
}
if (range.hasNoUpperLimit()) { max="inf"; } else {
max = Double.toString(range.getEndValue().doubleValue());
if (range.get().hasNoUpperLimit()) { max="inf"; } else {
max = Double.toString(range.get().getEndValue().doubleValue());
}
} else { // domain.isBoolean()
min = "0";
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment