Change VectorMagnitude to work with any type of field
Previously, VectorMagnitude
only worked with Vec
s of size 2, 3, or
4. It now works with Vec
s of any size. It also avoids a memory copy of
non-float types (although it does add a little arithmetic in the
computation).