func insertUnitToKdTree(tree *kdtree.T, unit Movable) *kdtree.T { unitT := new(kdtree.T) unitT.Point = kdtree.Point{float64(unit.GetX()), float64(unit.GetY())} unitT.Data = unit return tree.Insert(unitT) }
func insertUnitToKdTree(tree *kdtree.T, unit *Unit) *kdtree.T { unitT := new(kdtree.T) unitT.Point = kdtree.Point{float64(unit.X), float64(unit.Y)} unitT.Data = unit return tree.Insert(unitT) }