Vector int-float conversion methods
This commit is contained in:
@@ -44,6 +44,10 @@ pub const Vector2Int_x8 = struct {
|
||||
|
||||
// --- CONVERSION ----------------------------------------------------------
|
||||
|
||||
pub inline fn asFloat(self: Vector2Int_x8) vm.Vector2x8 {
|
||||
return .{ .x = @floatFromInt(self.x), .y = @floatFromInt(self.y) };
|
||||
}
|
||||
|
||||
pub inline fn withZ(self: Vector2Int_x8, z: vm.i32x8) vm.Vector3Int_x8 {
|
||||
return .{ .x = self.x, .y = self.y, .z = z };
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user