mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-09-30 19:51:16 +00:00
Better decimal support (For ABCs with minor version 17)
This commit is contained in:
+27
@@ -0,0 +1,27 @@
|
||||
package
|
||||
{
|
||||
import flash.display.Sprite;
|
||||
import flash.events.Event;
|
||||
|
||||
/**
|
||||
* ...
|
||||
* @author Jindra
|
||||
*/
|
||||
public class Main extends Sprite
|
||||
{
|
||||
|
||||
public function Main()
|
||||
{
|
||||
if (stage) init();
|
||||
else addEventListener(Event.ADDED_TO_STAGE, init);
|
||||
}
|
||||
|
||||
private function init(e:Event = null):void
|
||||
{
|
||||
removeEventListener(Event.ADDED_TO_STAGE, init);
|
||||
// entry point
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
package {
|
||||
public class Number {
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
package
|
||||
{
|
||||
public class Object
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
package {
|
||||
public namespace AS3 = "http://adobe.com/AS3/2006/builtin";
|
||||
|
||||
public const NaN: Number = 0 / 0;
|
||||
|
||||
public const Infinity: Number = 1 / 0;
|
||||
|
||||
public const undefined = void 0;
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
package __AS3__.vec {
|
||||
|
||||
public class Vector {
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
package {
|
||||
public class decimal {
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
package {
|
||||
public class int {
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
package mypkg
|
||||
{
|
||||
public class MyClass
|
||||
{
|
||||
private var attr_dec:decimal;
|
||||
private var attr_int:int;
|
||||
|
||||
public function test(arg_d:decimal): void
|
||||
{
|
||||
//trace("Hello world");
|
||||
|
||||
//HALF_EVEN, DOWN, FLOOR, UP, CEILING, HALF_UP, HALF_DOWN
|
||||
|
||||
//use precision 10, rounding FLOOR;
|
||||
//var arr = [];
|
||||
//arg_d = arr[4];
|
||||
/*var a:int = 1;
|
||||
var b:int = 2;
|
||||
var c:decimal = a < 3 ? a : b;*/
|
||||
//this.testd(4);
|
||||
var i:* = 70000;
|
||||
|
||||
var a:decimal = 10000000010000000002000000000300000000040000000005m;
|
||||
}
|
||||
|
||||
private function testd(arg_d:decimal) {
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
include "Object.as"
|
||||
include "Number.as"
|
||||
include "int.as"
|
||||
include "decimal.as"
|
||||
include "__AS3__/vec/Vector.as"
|
||||
include "TopLevel.as"
|
||||
include "mypkg/MyClass.as"
|
||||
Reference in New Issue
Block a user