Update Files

This commit is contained in:
2025-01-22 16:18:30 +01:00
parent ed4603cf95
commit a36294b518
16718 changed files with 2960346 additions and 0 deletions

View File

@ -0,0 +1,29 @@
package kha.arrays;
@:forward
abstract Float64Array(ByteArray) from ByteArray to ByteArray {
public var length(get, never): Int;
inline function get_length(): Int {
return this.byteLength >> 3;
}
public function new(elements: Int) {
this = ByteArray.make(elements * 8);
}
@:arrayAccess
public inline function get(k: Int): Float {
return this.getFloat64(k * 8);
}
@:arrayAccess
public inline function set(k: Int, v: Float): Float {
this.setFloat64(k * 8, v);
return v;
}
public inline function subarray(start: Int, ?end: Int): Float64Array {
return this.subarray(start * 8, end != null ? end * 8 : end);
}
}