|
@@ -1,11 +1,11 @@
|
|
|
package;
|
|
|
-import system.Random;
|
|
|
+import cs.system.Random;
|
|
|
|
|
|
@:core_api @:nativegen class Math
|
|
|
{
|
|
|
public static inline function __init__():Void
|
|
|
{
|
|
|
- PI = system.Math.PI;
|
|
|
+ PI = cs.system.Math.PI;
|
|
|
NaN = untyped __cs__("double.NaN");
|
|
|
NEGATIVE_INFINITY = untyped __cs__("double.NegativeInfinity");
|
|
|
POSITIVE_INFINITY = untyped __cs__("double.PositiveInfinity");
|
|
@@ -21,7 +21,7 @@ import system.Random;
|
|
|
|
|
|
public static inline function abs(v:Float):Float
|
|
|
{
|
|
|
- return system.Math.Abs(v);
|
|
|
+ return cs.system.Math.Abs(v);
|
|
|
}
|
|
|
|
|
|
public static inline function min(a:Float, b:Float):Float
|
|
@@ -36,37 +36,37 @@ import system.Random;
|
|
|
|
|
|
public static inline function sin(v:Float):Float
|
|
|
{
|
|
|
- return system.Math.Sin(v);
|
|
|
+ return cs.system.Math.Sin(v);
|
|
|
}
|
|
|
|
|
|
public static inline function cos(v:Float):Float
|
|
|
{
|
|
|
- return system.Math.Cos(v);
|
|
|
+ return cs.system.Math.Cos(v);
|
|
|
}
|
|
|
|
|
|
public static inline function atan2(y:Float, x:Float):Float
|
|
|
{
|
|
|
- return system.Math.Atan2(y, x);
|
|
|
+ return cs.system.Math.Atan2(y, x);
|
|
|
}
|
|
|
|
|
|
public static inline function tan(v:Float):Float
|
|
|
{
|
|
|
- return system.Math.Tan(v);
|
|
|
+ return cs.system.Math.Tan(v);
|
|
|
}
|
|
|
|
|
|
public static inline function exp(v:Float):Float
|
|
|
{
|
|
|
- return system.Math.Exp(v);
|
|
|
+ return cs.system.Math.Exp(v);
|
|
|
}
|
|
|
|
|
|
public static inline function log(v:Float):Float
|
|
|
{
|
|
|
- return system.Math.Log(v);
|
|
|
+ return cs.system.Math.Log(v);
|
|
|
}
|
|
|
|
|
|
public static inline function sqrt(v:Float):Float
|
|
|
{
|
|
|
- return system.Math.Sqrt(v);
|
|
|
+ return cs.system.Math.Sqrt(v);
|
|
|
}
|
|
|
|
|
|
public static function round(v:Float):Int
|
|
@@ -84,32 +84,32 @@ import system.Random;
|
|
|
|
|
|
public static inline function floor(v:Float):Int
|
|
|
{
|
|
|
- return Std.int(system.Math.Floor(v));
|
|
|
+ return Std.int(cs.system.Math.Floor(v));
|
|
|
}
|
|
|
|
|
|
public static inline function ceil(v:Float):Int
|
|
|
{
|
|
|
- return Std.int(system.Math.Ceiling(v));
|
|
|
+ return Std.int(cs.system.Math.Ceiling(v));
|
|
|
}
|
|
|
|
|
|
public static inline function atan(v:Float):Float
|
|
|
{
|
|
|
- return system.Math.Atan(v);
|
|
|
+ return cs.system.Math.Atan(v);
|
|
|
}
|
|
|
|
|
|
public static inline function asin(v:Float):Float
|
|
|
{
|
|
|
- return system.Math.Asin(v);
|
|
|
+ return cs.system.Math.Asin(v);
|
|
|
}
|
|
|
|
|
|
public static inline function acos(v:Float):Float
|
|
|
{
|
|
|
- return system.Math.Acos(v);
|
|
|
+ return cs.system.Math.Acos(v);
|
|
|
}
|
|
|
|
|
|
public static inline function pow(v:Float, exp:Float):Float
|
|
|
{
|
|
|
- return system.Math.Pow(v, exp);
|
|
|
+ return cs.system.Math.Pow(v, exp);
|
|
|
}
|
|
|
|
|
|
public static inline function random() : Float
|