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 Vector3x8 = struct {
// --- CONVERSION ----------------------------------------------------------
pub inline fn asInt(self: Vector3x8) vm.Vector3Int_x8 {
return .{ .x = @intFromFloat(self.x), .y = @intFromFloat(self.y), .z = @intFromFloat(self.z) };
}
pub inline fn dropZ(self: Vector3x8) vm.Vector2x8 {
return .{ .x = self.x, .y = self.y };
}