fix a mistake at vector.line and add gitignore

This commit is contained in:
HybridDog 2014-06-09 15:32:15 +02:00
parent 11d6679bbc
commit 9be98c66ab
3 changed files with 6 additions and 3 deletions

4
.gitignore vendored Normal file

@ -0,0 +1,4 @@
## Generic ignorable patterns and files
*~
.*.swp
debug.txt

@ -1,2 +1,2 @@
TODO: TODO:
maybe change vector.chunkcorner add things to this list

@ -130,8 +130,7 @@ end
function vector.line(pos, dir, range) function vector.line(pos, dir, range)
--assert_vector(pos) --assert_vector(pos)
if not range then --dir = pos2 if not range then --dir = pos2
dir = vector.direction(pos, dir) dir, range = vector.direction(pos, dir), vector.distance(pos, dir)
range = vector.distance(pos, dir)
end end
return return_line(pos, dir, range) return return_line(pos, dir, range)
end end