first round of spritebatch improvements

This commit is contained in:
2024-09-14 15:14:44 +10:00
parent 93d7b4e08a
commit 1f5c59fe77
4 changed files with 187 additions and 128 deletions

View File

@ -13,6 +13,11 @@ public struct Point<T: AdditiveArithmetic & Hashable>: Hashable {
self.y = value
}
public init(_ size: Size<T>) {
self.x = size.w
self.y = size.h
}
@inline(__always) public static func == (lhs: Self, rhs: Self) -> Bool { lhs.x == rhs.x && lhs.y == rhs.y }
@inline(__always) public static func != (lhs: Self, rhs: Self) -> Bool { lhs.x != rhs.x || lhs.y != rhs.y }
}