Vector int-float conversion methods
This commit is contained in:
@@ -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 };
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user