Function vectorToPoint