     MOUSE.pos.x = evt.clientX - rect.left
     MOUSE.pos.y = evt.clientY - rect.top
 
-  # Make the particles explode away from the mouse
   explode_particles: (evt) =>
+    ### Make the particles explode away from the mouse. ###
     for particle in @particles
       difference = Vector.subtract(MOUSE.pos, particle.pos)
       dist = Math.max(difference.mag(), 1)
-      
+
       push_force = -1000 
       vel_mag = push_force / dist
       particle.vel.plus(Vector.unit(difference).s_mult(vel_mag))

      -> return new Particle(_.random(0, @canvas.width),
                             _.random(0, @canvas.height),
                             1,
                             colors[_.random(0, colors.length)])
    )
    return _.map(funcs, (f) -> f())


---

class Vector
  ### Class for representing and manipulating vectors. ###
  constructor: (@x, @y) ->

  mag: ->
    ### Get the magnitude of this Vector. ###
    return Math.sqrt(@mag_sq())

  mag_sq: ->
    ### Get the magnitude squared for this Vector. ###
    return @x * @x + @y * @y

  minus: (vec) ->
    ### Subtract <vec> from this Vector and return it. ###
    @x -= vec.x
    @y -= vec.y
    return @

  plus: (vec) ->
    ### Add <vec> to this Vector and return it. ###
    @x += vec.x
    @y += vec.y
    return @

  s_mult: (factor) ->
    ### Scalar multiply this Vector by <factor>. ###
    @x *= factor
    @y *= factor
    return @

  s_div: (factor) ->
    ### Scalar divide this Vector by <factor> and return it. ###
    @x /= factor
    @y /= factor
    return @

  @add: (vec1, vec2) ->
    ### Add Vectors <vec1> and <vec2> together and return a new Vector. ###
    return new Vector(vec1.x, vec1.y).plus(vec2)

  @subtract: (vec1, vec2) ->
    ### Subtract Vector <vec2> from <vec1> and return a new Vector. ###
    return new Vector(vec1.x, vec1.y).minus(vec2)

  @unit: (vec) ->
    ### Return a new Vector equivalent to normalizing <vec>. ###
    mag = vec.mag()
    if mag != 0
      return new Vector(vec.x / mag, vec.y / mag)
