lib/ruby_on_rays/vector2.rb
# Divides self by a scalar.
# @param rhs [Float]
# @return [self]
# @note Does not check for 0 divisor or 0 numerators!
Divides self by a scalar.
Divides self by a scalar .
def div!(rhs)
      inverse = 1.0 / rhs
      @x *= inverse
      @y *= inverse
      self
    end
def div! ( rhs ) inverse = 1.0 / rhs @x *= inverse @y *= inverse self end
Divides self by a scalar.
Divides self by a scalar .
None
self
rhs
<not_specific>
<not_specific>
None
note
Does not check for 0 divisor or 0 numerators!
Does not check for 0 divisor or 0 numerators!