BitConverter.hx 882 B

1234567891011121314151617181920
  1. package system;
  2. import cs.NativeArray;
  3. import cs.NativeArray;
  4. import cs.StdTypes;
  5. import haxe.Int64;
  6. @:native('System.BitConverter') extern class BitConverter
  7. {
  8. static var IsLittleEndian(default, null):Bool;
  9. static function DoubleToInt64Bits(v:Float):Int64;
  10. static function Int64BitsToDouble(v:Int64):Float;
  11. static function GetBytes(d:Dynamic):NativeArray<UInt8>;
  12. static function ToBoolean(b:NativeArray<UInt8>, startIndex:Int):Bool;
  13. static function ToChar(b:NativeArray<UInt8>, startIndex:Int):Char16;
  14. static function ToDouble(b:NativeArray<UInt8>, startIndex:Int):Float;
  15. static function ToInt16(b:NativeArray<UInt8>, startIndex:Int):Int16;
  16. static function ToInt32(b:NativeArray<UInt8>, startIndex:Int):Int;
  17. static function ToInt64(b:NativeArray<UInt8>, startIndex:Int):Int64;
  18. static function ToSingle(b:NativeArray<UInt8>, startIndex:Int):Single;
  19. }