Vector int-float conversion methods

This commit is contained in:
2026-01-06 21:14:12 +01:00
parent 7963813034
commit 34f0b1fb89
13 changed files with 53 additions and 5 deletions

View File

@@ -48,6 +48,10 @@ pub const Vector3Int_x8 = struct {
// --- CONVERSION ----------------------------------------------------------
pub inline fn asFloat(self: Vector3Int_x8) vm.Vector3x8 {
return .{ .x = @floatFromInt(self.x), .y = @floatFromInt(self.y), .z = @floatFromInt(self.z) };
}
pub inline fn dropZ(self: Vector3Int_x8) vm.Vector2Int_x8 {
return .{ .x = self.x, .y = self.y };
}