Browse Source

Float64Array actually use 64-bit floats (#9972)

mchudleigh 4 years ago
parent
commit
a89dd73ffb
1 changed files with 2 additions and 2 deletions
  1. 2 2
      std/haxe/io/Float64Array.hx

+ 2 - 2
std/haxe/io/Float64Array.hx

@@ -43,12 +43,12 @@ abstract Float64Array(Float64ArrayData) {
 	}
 	}
 
 
 	@:arrayAccess public inline function get(index:Int):Float {
 	@:arrayAccess public inline function get(index:Int):Float {
-		return this.bytes.getFloat((index << 3) + this.byteOffset);
+		return this.bytes.getDouble((index << 3) + this.byteOffset);
 	}
 	}
 
 
 	@:arrayAccess public inline function set(index:Int, value:Float):Float {
 	@:arrayAccess public inline function set(index:Int, value:Float):Float {
 		if (index >= 0 && index < length) {
 		if (index >= 0 && index < length) {
-			this.bytes.setFloat((index << 3) + this.byteOffset, value);
+			this.bytes.setDouble((index << 3) + this.byteOffset, value);
 			return value;
 			return value;
 		}
 		}
 		return 0;
 		return 0;