We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f6f8ba9 commit 78d5cbdCopy full SHA for 78d5cbd
TestHScript.hx
@@ -49,6 +49,10 @@ class TestHScript extends TestCase {
49
assertScript("- 123",-123);
50
assertScript("1.546",1.546);
51
assertScript(".545",.545);
52
+ assertScript("1e5",100000);
53
+ assertScript("1.2e2",120);
54
+ assertScript("100e-2",1);
55
+ assertScript("1.2e-1",0.12);
56
assertScript("'bla'","bla");
57
assertScript("null",null);
58
assertScript("true",true);
hscript/Parser.hx
@@ -1393,6 +1393,8 @@ class Parser {
1393
}
1394
if( pow == null )
1395
invalidChar(char);
1396
+ if( exp == 0 )
1397
+ exp = 10;
1398
return TConst(CFloat((Math.pow(10, pow) / exp) * n * 10));
1399
case ".".code:
1400
if( exp > 0 ) {
0 commit comments