Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
monticore
EmbeddedMontiArc
languages
EmbeddedMontiArc
Commits
6167615e
Commit
6167615e
authored
Nov 22, 2017
by
Alexander Ryndin
Browse files
Merge branch 'master' into ryndin
parents
f5057434
c3f127c1
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/main/java/de/monticore/lang/embeddedmontiarc/embeddedmontiarc/unit/constant/EMAConstantSIUnit.java
View file @
6167615e
...
...
@@ -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
;
}
}
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment