added vector distance function + changed pointDirection(vec) -> direction(vec)