lib/traits/targeting/closest.rb in gosu_extensions-0.2.6 vs lib/traits/targeting/closest.rb in gosu_extensions-0.2.7

- old
+ new

@@ -7,10 +7,10 @@ # Returns the closest target of all targets in the fire arc. # # TODO fire arc # def acquire *targets - targets.sort_by {|target| distance = (target.position - self.position).length }.first + targets.sort_by { |target| (target.position - self.position).length }.first end end end \ No newline at end of file