float length(const float3 &vec)
{
    return vec.length();
}