magnitude()
Returns the modulus (Pythagorean distance) of the vector.
Vector[5,8,2].r => 9.643650761
# File lib/matrix.rb, line 2051 def magnitude Math.sqrt(@elements.inject(0) {|v, e| v + e.abs2}) end