Alloy icon indicating copy to clipboard operation
Alloy copied to clipboard

extension MTLRegion has wrong (+1) maxX maxY maxZ

Open atrbx5 opened this issue 3 years ago • 1 comments

if my texture has size of 5 then my minX is 0 and my maxX is 4 with current implementation it's 5

public extension MTLRegion {
    var maxX: Int {
        return self.origin.x + self.size.width
    }    
    var maxY: Int {
        return self.origin.y + self.size.height
    }    
    var maxZ: Int {
        return self.origin.z + self.size.depth
    }

atrbx5 avatar Feb 16 '22 14:02 atrbx5

hmmm, yes, this seems wrong. I will try to address this asap, would you love to hit a PR maybe?

s1ddok avatar Feb 16 '22 17:02 s1ddok

took me a while but I finally fixed it lol

s1ddok avatar Jan 06 '23 18:01 s1ddok

took me a while but I finally fixed it lol

oh yeah... Feb 2022 I was a bit distracted from making PR ;) sorry

atrbx5 avatar Jan 19 '23 17:01 atrbx5