Commit c3f127c1 authored by Sascha Niklas Schneiders's avatar Sascha Niklas Schneiders
Browse files

updated value printing

parent 49661615
......@@ -50,10 +50,17 @@ public class EMAConstantSIUnit extends EMAConstantValue {
/**
* Does not return the unit, just the value
*
* @return
*/
@Override
public String getValueAsString(){
return getRational().toString();
public String getValueAsString() {
String result = "";
if (getRational().getDivisor().intValue() == 1) {
result += getRational().intValue();
} else {
result += getRational().doubleValue();
}
return result;
}
}
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