template vec-functions + operators