github.com/df-mc/dragonfly@v0.9.13/server/block/cube/range.go (about) 1 package cube 2 3 // Range represents the height range of a Dimension in blocks. The first value of the Range holds the minimum Y value, 4 // the second value holds the maximum Y value. 5 type Range [2]int 6 7 // Min returns the minimum Y value of a Range. It is equivalent to Range[0]. 8 func (r Range) Min() int { 9 return r[0] 10 } 11 12 // Max returns the maximum Y value of a Range. It is equivalent to Range[1]. 13 func (r Range) Max() int { 14 return r[1] 15 } 16 17 // Height returns the total height of the Range, the difference between Max and Min. 18 func (r Range) Height() int { 19 return r[1] - r[0] 20 }