r() Instance Public methods Alias for: magnitude
normalize() Instance Public methods Returns a new vector with the same direction but with norm 1. v = Vector[5,8,2].normalize # => Vector[0.5184758473652127, 0.8295613557843402, 0.20739033894608505] v.norm => 1.0
norm() Instance Public methods Alias for: magnitude
map2(v) Instance Public methods Like #collect2, but returns a Vector instead of an Array.
map() Instance Public methods Alias for: collect
magnitude() Instance Public methods Returns the modulus (Pythagorean distance) of the vector. Vector[5,8,2].r => 9.643650761 r norm
inspect() Instance Public methods Overrides Object#inspect
inner_product(v) Instance Public methods Returns the inner product of this vector with the other. Vector[4,7].inner_product Vector[10,1] => 47
hash() Instance Public methods Return a hash-code for the vector.
eql?(other) Instance Public methods
Page 482 of 2275