Unexport render internal methods.

This commit is contained in:
Sascha L. Teichmann 2016-04-24 13:31:13 +02:00
parent 6ab45d13c0
commit 67a16e2d3e

View File

@ -275,17 +275,17 @@ func (r *Renderer) RenderBlock(block *Block, colors *Colors) (err error) {
return return
} }
func (a Area) Contains(x, z int16) bool { func (a Area) contains(x, z int16) bool {
return x >= a.X1 && x <= a.X2 && z >= a.Z1 && z <= a.Z2 return x >= a.X1 && x <= a.X2 && z >= a.Z1 && z <= a.Z2
} }
func (a Area) IsHigher() bool { func (a Area) higher() bool {
return a.Z2-a.Z1 > a.X2-a.X1 return a.Z2-a.Z1 > a.X2-a.X1
} }
func areasContain(areas []Area, x, z int16) bool { func areasContain(areas []Area, x, z int16) bool {
for _, r := range areas { for _, r := range areas {
if r.Contains(x, z) { if r.contains(x, z) {
return true return true
} }
} }
@ -317,7 +317,7 @@ func (r *Renderer) UncoveredAreas(newAreas, oldAreas []Area) []Area {
var xFirst bool var xFirst bool
// Try to extend in the direction with most gain // Try to extend in the direction with most gain
// of blocks. // of blocks.
if area.IsHigher() { // Higher means to win more blocks in x direction. if area.higher() { // Higher means to win more blocks in x direction.
xFirst = true xFirst = true
} }
dirs: dirs: