소스 검색

Float64Array actually use 64-bit floats (#9972)

mchudleigh 5 년 전
부모
커밋
a89dd73ffb
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  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 {
-		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 {
 		if (index >= 0 && index < length) {
-			this.bytes.setFloat((index << 3) + this.byteOffset, value);
+			this.bytes.setDouble((index << 3) + this.byteOffset, value);
 			return value;
 		}
 		return 0;