We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I got follow error after compile my hx code to Java
/usr/local/lib/haxe/lib/thx,core/0,44,0/src/thx/Weekday.hx:7: characters 1-7 : Warning : (WDeprecatedEnumAbstract) `@:enum abstract` is deprecated in favor of `enum abstract` /usr/local/lib/haxe/lib/thx,core/0,44,0/src/thx/Weekday.hx:7: characters 1-7 : Warning : (WDeprecatedEnumAbstract) `@:enum abstract` is deprecated in favor of `enum abstract` /usr/local/lib/haxe/lib/thx,core/0,44,0/src/thx/Assert.hx:142: characters 45-73 : Warning : (WDeprecated) Std.is is deprecated. Use Std.isOfType instead. /usr/local/lib/haxe/lib/thx,core/0,44,0/src/thx/Assert.hx:143: characters 12-31 : Warning : (WDeprecated) Std.is is deprecated. Use Std.isOfType instead. /usr/local/lib/haxe/lib/thx,core/0,44,0/src/thx/Assert.hx:289: characters 47-75 : Warning : (WDeprecated) Std.is is deprecated. Use Std.isOfType instead. /usr/local/lib/haxe/lib/thx,core/0,44,0/src/thx/Assert.hx:298: characters 22-50 : Warning : (WDeprecated) Std.is is deprecated. Use Std.isOfType instead. /usr/local/lib/haxe/lib/thx,core/0,44,0/src/thx/Assert.hx:301: characters 16-32 : Warning : (WDeprecated) Std.is is deprecated. Use Std.isOfType instead. /usr/local/lib/haxe/lib/thx,core/0,44,0/src/thx/Assert.hx:431: characters 13-37 : Warning : (WDeprecated) Std.is is deprecated. Use Std.isOfType instead. /usr/local/lib/haxe/lib/thx,core/0,44,0/src/thx/Assert.hx:441: characters 12-35 : Warning : (WDeprecated) Std.is is deprecated. Use Std.isOfType instead. /usr/local/lib/haxe/lib/thx,core/0,44,0/src/thx/Assert.hx:461: characters 12-34 : Warning : (WDeprecated) Std.is is deprecated. Use Std.isOfType instead. /usr/local/lib/haxe/lib/thx,core/0,44,0/src/thx/Assert.hx:470: characters 12-35 : Warning : (WDeprecated) Std.is is deprecated. Use Std.isOfType instead. /usr/local/lib/haxe/lib/thx,core/0,44,0/src/thx/Assert.hx:485: characters 13-96 : Warning : (WDeprecated) Std.is is deprecated. Use Std.isOfType instead. /usr/local/lib/haxe/lib/thx,core/0,44,0/src/thx/Dynamics.hx:35: characters 13-30 : Warning : (WDeprecated) Std.is is deprecated. Use Std.isOfType instead. /usr/local/lib/haxe/lib/thx,core/0,44,0/src/thx/Dynamics.hx:39: characters 13-29 : Warning : (WDeprecated) Std.is is deprecated. Use Std.isOfType instead. /usr/local/lib/haxe/lib/thx,core/0,44,0/src/thx/Dynamics.hx:51: characters 12-27 : Warning : (WDeprecated) Std.is is deprecated. Use Std.isOfType instead. /usr/local/lib/haxe/lib/thx,core/0,44,0/src/thx/Dynamics.hx:55: characters 13-26 : Warning : (WDeprecated) Std.is is deprecated. Use Std.isOfType instead. /usr/local/lib/haxe/lib/thx,core/0,44,0/src/thx/Dynamics.hx:255: characters 16-29 : Warning : (WDeprecated) Std.is is deprecated. Use Std.isOfType instead. /usr/local/lib/haxe/lib/thx,core/0,44,0/src/thx/Error.hx:18: characters 8-26 : Warning : (WDeprecated) Std.is is deprecated. Use Std.isOfType instead. /usr/local/lib/haxe/lib/thx,core/0,44,0/src/thx/Maps.hx:127: characters 12-27 : Warning : (WDeprecated) Std.is is deprecated. Use Std.isOfType instead. /usr/local/lib/haxe/lib/thx,core/0,44,0/src/thx/Objects.hx:50: characters 10-26 : Warning : (WDeprecated) Std.is is deprecated. Use Std.isOfType instead. /usr/local/lib/haxe/lib/thx,core/0,44,0/src/thx/Objects.hx:229: characters 22-39 : Warning : (WDeprecated) Std.is is deprecated. Use Std.isOfType instead. /usr/local/lib/haxe/lib/thx,core/0,44,0/src/thx/Types.hx:117: characters 8-37 : Warning : (WDeprecated) Std.is is deprecated. Use Std.isOfType instead. /usr/local/lib/haxe/lib/thx,core/0,44,0/src/thx/Types.hx:119: characters 8-28 : Warning : (WDeprecated) Std.is is deprecated. Use Std.isOfType instead. /usr/local/lib/haxe/lib/thx,core/0,44,0/src/thx/Types.hx:121: characters 8-27 : Warning : (WDeprecated) Std.is is deprecated. Use Std.isOfType instead. Stack overflow
My src code
import thx.Decimal; class ContractMath { /*** 张数 = 数量/合约面值 **/ static function getPiecesByAmount(amount:Decimal, multifier:Decimal):Decimal { if (multifier <= 0) { return -1; } return amount/multifier; } /*** 数量(本位币) = 张数*合约面值 **/ static function getAmount(pieces:Int, multifier:Decimal):Decimal { return pieces*multifier; } /*** 委托价值(市价)= 委托张数*合约面值*标记价格 **/ static function getValueByMarkPrice(pieces:Int, multifier:Decimal, markPrice:Decimal):Decimal { return pieces*multifier*markPrice; } /*** 委托价值(限价)= 委托张数*合约面值*限价价格 **/ static function getValueByLimitPrice(pieces:Int, multifier:Decimal, limitPrice:Decimal):Decimal { return pieces*multifier*limitPrice; } /*** 委托张数(市价)= 委托价值/合约面值/标记价格 **/ static function getPiecesByMarkPrice(value:Decimal, mulitifier:Decimal, markPrice:Decimal):Decimal { if (mulitifier <= 0 || markPrice <= 0) { return -1; } return value/mulitifier/markPrice; } /*** 委托张数(限价)= 委托价值/合约面值/委托价格 **/ static function getPiecesByLimitPrice(value:Decimal, mulitifier:Decimal, limitPrice:Decimal):Decimal { if (mulitifier <= 0 || limitPrice <= 0) { return -1; } return value/mulitifier/limitPrice; } /*** 盈亏= (当前标记价格-持仓均价)*持仓币量 **/ static function getPNL(markPrice:Decimal, avgFilledPrice:Decimal, filledAmount:Decimal):Decimal { return (markPrice-avgFilledPrice)*filledAmount; } /*** 回报率= 盈亏/(持仓均价*持仓币量/杠杆倍数) **/ static function getPNLRate(pnl:Decimal, avgFilledPrice:Decimal, filledAmount:Decimal, leverLevel:Int):Decimal { if (avgFilledPrice <= 0 || filledAmount <= 0 || leverLevel <= 0) { return -1; } return pnl/(avgFilledPrice*filledAmount/leverLevel); } }
My compile cmd: haxe -lib thx.core Main.hx -java java
haxe -lib thx.core Main.hx -java java
I have installed thx.core: [0.44.0] Who has ideas how to fix this problem?
The text was updated successfully, but these errors were encountered:
The library is not regularly maintained and probably needs some adjustment like the one suggested by the compiler.
Sorry, something went wrong.
No branches or pull requests
I got follow error after compile my hx code to Java
My src code
My compile cmd:
haxe -lib thx.core Main.hx -java java
I have installed thx.core: [0.44.0]
Who has ideas how to fix this problem?
The text was updated successfully, but these errors were encountered: