aboutsummaryrefslogtreecommitdiffstats
path: root/src/transpile_js.rs
diff options
context:
space:
mode:
authorbnewbold <bnewbold@robocracy.org>2017-01-28 21:36:49 -0800
committerbnewbold <bnewbold@robocracy.org>2017-01-28 21:36:49 -0800
commit97b0fc2295adcdb1ba54e003227f486a92425acd (patch)
tree5ff8f4c3a76681955cf33a456bc149b1d3ac1d00 /src/transpile_js.rs
parent1aec9b6479beecd327456780ae7c711040011933 (diff)
downloadmodelthing-97b0fc2295adcdb1ba54e003227f486a92425acd.tar.gz
modelthing-97b0fc2295adcdb1ba54e003227f486a92425acd.zip
switch to sci notation for floats (except latex)
Diffstat (limited to 'src/transpile_js.rs')
-rw-r--r--src/transpile_js.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/transpile_js.rs b/src/transpile_js.rs
index 586abc1..282240b 100644
--- a/src/transpile_js.rs
+++ b/src/transpile_js.rs
@@ -105,7 +105,7 @@ impl TranspileJS for Expr {
use modelica_parser::Expr::*;
match *self {
Integer(e) => Ok(format!("{}", e)),
- Float(e) => Ok(format!("{}", e)),
+ Float(e) => Ok(format!("{:e}", e)),
Boolean(true) => Ok(format!("true")),
Boolean(false) => Ok(format!("false")),
StringLiteral(ref s) => Ok(format!("\"{}\"", s)),